Comparing Dynamic Hand Rehabilitation Gestures in Leap Motion Using Multi-Dimensional Dynamic Time Warping

We propose and evaluate the use of Multi-dimensional Dynamic Time Warping (MDTW) for comparing dynamic hand rehabilitation gestures that would be performed by a patient (query) relative to hand gestures prepared by a physiotherapist (reference). MDTW enables us to determine how similar or different a query dynamic hand gesture is to a reference one whilst filtering out unwanted sources of error resulting from positional, rotational or speed differences between the query and the reference actions. It produces a minimum-distance value of a warp path after aligning a query dynamic hand gesture with a reference one. A low minimum-distance value implies the two gestures being compared are similar and high minimum-distance value implies the two gestures vary to a greater extent. When we deliberately compare a specific hand gesture with itself, we obtain a minimum-distance value of 0° indicating the similarity is 100%. Furthermore, when we compare two closely similar hand gestures i.e. gesture 1 and gesture 4, a minimum-distance value of 35.9° is obtained. However, when we compare two quite different gestures i.e. gesture 2 and gesture 3, a minimum-distance value of 248.5° is obtained. Therefore, a physiotherapist can establish whether a patient performs hand rehabilitation gestures satisfactorily or an adjustment is required based on the minimum-distance values of the warp paths.


I. INTRODUCTION
P ATIENTS suffering from stroke, neurological disorders, hand related injuries etc. usually need different forms of hand rehabilitation in order to recover expeditiously [1].Most hand rehabilitation procedures are recommended to be executed with help of a physiotherapist that supervises a patient so that he or she can perform the correct hand exercises or gestures [2].The cost of rehabilitation related services at hospitals or clinics and an increasing size of ageing population are responsible for considering the relocation of hand rehabilitation related services away from medical centres i.e. at home [3] to reduce expense and improve patient convenience [4].With the aid of sensor "gadgets" and computing devices, home-based rehabilitation may be a viable Manuscript received November 18, 2020; revised December 14, 2020; accepted December 20, 2020.Date of publication December 24, 2020; date of current version February 17, 2021.The associate editor coordinating the review of this article and approving it for publication was Dr. Marco J. Da Silva.(Corresponding author: Hussein Walugembe.) The authors are with the School of Electronic Engineering and Computer Science, Queen Mary University of London, London E1 4NS, U.K. (e-mail: h.walugembe@qmul.ac.uk).
Digital Object Identifier 10.1109/JSEN.2020.3047268option to eliminate the presence of a physiotherapist during a hand rehabilitation session [2].However, in such a scenario, offline monitoring should be implemented to motivate patients and make corrections to imprecise hand rehabilitation exercises [4].This form of monitoring requires parameters to be recorded and submitted to a physiotherapist or an expert for analysis and prompt feedback [2].
Hand rehabilitative approaches are generally tailored to the patient's needs and due to this patient-tailoring, a high resource demand is likely to be experienced.This is common to many rehabilitative treatments [5].The resource demand may include the time a therapist spends interacting with a patient, costly instrumentation and testing equipment, the use of healthcare facilities and the related overheads [5].In order to reduce these costs, researchers have turned their attention to implementing contactless systems with the help of computer vision techniques [2].However, vision-based systems have limitations [6].The Performance of such systems is hindered by factors such as the background, illumination contrast, noise related factors, ease of use etc. [6].For instance, a scheme proposed in [6] aids rehabilitation whereby a ball is fixed to a hand gripper.Even so this may not effectively support hand finger rehabilitation since a patient is required to grasp when performing a rehabilitation procedure yet he or she may not be capable of this depending on severity of the illness [7].
There exist markerless devices in healthcare stores that can be utilised by people affected with hand injuries when executing hand rehabilitation tasks.Examples of these devices include Intel's RealSense 3-D Camera, the Inertial Measurement Unit (IMU) sensor, the Kinect Sensor [8]- [11], tilt sensors [12], [13], camera supported devices [14]- [16], Leap Motion controller (LM) [17], etc.In addition, wearable devices have also been employed in hand rehabilitation settings through implementing a number of sensors such as optical linear encoder, knitted piezoresistive fabric, smart wearable armband [18], etc.In our analysis of different sensors, we have discovered that some sensors may make patients uncomfortable when using them, at least initially, because they need time to familiarize with the setup regime before use [4].For instance, tilt sensors typically require a patient to perform a complex start-up process [19].
During the implementation of our proposed hand rehabilitation setup, we deployed LM since it is a lightweight and affordable device compared to the most of previously mentioned sensors.Moreover, it can be easily operated by a patient as required.When connected to a computing device the LM can guide patients through hand rehabilitation exercises like the ones employed when recovering from strokes or hand related injuries, to improve the performance of activities of daily living in order to boost wellbeing [2].In addition, a patient can use LM at any convenient location with limited investment expenditure, and without the necessary presence of a skilled person to calibrate and adjust the equipment [17].
However LM can also be applied in various areas.For instance, in an automotive industry environment [20], both LM and Kinect data were employed for programming the robot's movement and managing the program's execution in an open-ended system.In [21], LM was employed to recognize various sign languages.Furthermore, LM is widely used in applications of virtual reality (VR) that incorporate entertainment industry and education sector [22].
In this paper we compare dynamic hand rehabilitation gestures such that a physiotherapist or an expert could establish how well a patient performs hand dynamic gestures in comparison to predefined ones that are recommended by a physiotherapist.After establishing the extent to which a performed hand gesture matches a reference one, meaningful feedback can be generated to correct or encourage a patient to refine their actions during a session [23].We propose and implement Multi-dimensional Dynamic Time Warping (MDTW) to quantify how similar or different two dynamic hand gestures are from each other [24].Dynamic Time Warping (DTW) is a broadly applied technique in speech recognition for establishing to what extent any two time series are similar or different.Both DTW and MDTW techniques utilise a distance metric between a query time-series and a reference one and create a discriminating value: a low distance value when the two time-series are similar and a high distance value when the two time-series are different [25].
There exist other possible dissimilarity measures such as Longest Common SubSequence [24], [26], edit distance with real penalty [24], edit distance on real sequences [24], [27], and time warp edit distance [24], [28].However, MDTW has an extra advantage since its implementation is simple and efficient.Furthermore, MDTW is superior because it is not necessary for both time-series being compared to be of equal length as required by typical distances and this behaviour is termed elasticity [24].MDTW is therefore an elastic dissimilarity technique that estimates the greatest match within two time-series by reducing a distance between them [24].
The novel contributions of our paper are: 1) Formulating a specific problem regarding the comparison of a dynamic query hand gesture with a dynamic reference hand gesture using DTW and MDTW; 2) Representing dynamic hand gestures using a feature vector in 3-D space; 3) Implementing and evaluating the efficacy of the MDTW technique.
The remaining sections of this paper are arranged as follows.Section II discusses potential applications and limitations of DTW.Section III presents significant content regarding the anatomy of a hand.It further presents how joint angles can be calculated.Dynamic time warping is discussed in Section IV where the problem formulation regarding both DTW and MDTW is illustrated.Section V discusses our methodology and experimental results are presented in Section VI.Finally, Section VII presents concluding remarks and future work.

II. APPLICATIONS AND LIMITATIONS OF DTW IN
LITERATURE DTW has been implemented to measure the correlation between two brain parts by performing a comparison between the synchronization and asynchrony of the time-series [29].DTW was employed because it considers the inherent timing and efficacy of functional magnetic resonance imaging (fMRI) time-series unlike Pearson correlation.However, in order to establish the best community structure of brain networks for each subject under consideration, other techniques were employed [29].
One of the limitations of DTW was reported by [30] when implemented for signature verification.The implementation involves obtaining correspondence and the similarity of two planar curves.The limitation was that in portions of the curves at locations with sparse sampling, insufficient resolution in the matching procedure was experienced attributed to the fact that DTW matches only individual samples instead of continuous curves.The authors in [30] further proposed that a feasible solution to this limitation is to oversample the curves.Oversampling can be implemented by employing a spline interpolation prior to curve matching.
In [31] DTW is implemented to measure time-series similarity, perform classification, and identify corresponding portions between two time-series.One strategy that was implemented applies a multilevel technique which repeatedly predicts a measurement from a coarse resolution and improves the predicted measurement.The strategy possesses linear time and space complexity and partially solves the issues of quadratic time and space complexity experienced by DTW when implemented with large time-series data sets [31].
In order to detect, locate, and characterise damage on large remote structural areas, DTW has been proposed and implemented where it compares guided wave data to a baseline signal [32].DTW performs better compared to similar techniques such as baseline signal stretch and scale transform [32].In fact, in this instance DTW takes into consideration factors such as large temperature differences, long propagation intervals, and high frequencies unlike baseline signal stretch and scale transform techniques.However, DTW does not completely detect structural changes through realigning guided waves to a baseline since is sensitive to temperature changes whilst not being adequately sensitive to long propagation distances and high frequencies [32].
DTW was implemented as a technique to distinguish various mechanical diagnostics of on-load tap changer (OLTC) [33] devices.OLTC is one of the parts in a transformer that is susceptible to faults.In addition, durability of the whole power system greatly depends on the OLTC status.Experiments demonstrate that DTW can adequately diagnose various OLTC faults under diverse fault extremities [33].On the other hand, the implemented DTW could not efficiently handle the limitations of excessive match and distance estimation [33] and this necessitates further research.

III. BACKGROUND
We briefly provide an overview of the hand that is essential for our MDTW implementation.We further provide how we calculate finger joint angles and, lastly, define a dynamic hand gesture.

A. Anatomy of the Hand
We briefly introduce a hand overview here i.e. the bones of the hand and finger joints.
1) Bones of the Hand: A human hand includes metacarpal bones.These are five bones that are located from the wrist to the initial bottom joint of every finger.In addition, the hand comprises fourteen small bones referred to as phalanges (phalanx for singular).Apart from the thumb that possesses only two phalanges, the other four fingers possess three phalanges i.e. distal, middle and proximal [34], [35].2) Finger Joints: Fig. 1 illustrates the joints and bones of a human hand.The finger joints arise when a pair of adjacent finger bones meet.Apart from the thumb that has two joints, the four fingers (index, middle, ring and little) have three joints.The following describes the different fingers joints.

• Distal Inter-Phalangeal (DIP) Joint
The DIP joint is situated at the topmost part of the finger in the vicinity of the lower part of the fingernail.This joint intersects the distal phalanx and the middle phalanx bone.Separate from the thumb, the four fingers each possess a DIP joint.

• Proximal Inter-Phalangeal (PIP) Joint
The PIP joint is the middle joint of each of the four fingers but not the thumb.This joint intersects the middle phalanx and the proximal phalanx bone.

• Inter-Phalangeal (IP) Joint
The IP joint is situated at the topmost part of the thumb in the vicinity of the base of the nail.This joint intersects the distal phalanx and the middle phalanx bone.

• Meta-Carpo-Phalangeal (MCP) Joint
The MCP joint is situated at the bottom part of all five fingers i.e. all the fingers possess a MCP joint.This joint intersects the metacarpal bone and the initial phalanx bone.

B. Joint Angle Calculation
Equation (1) and Fig. 2 provide a demonstration of how to calculate a specific joint angle of a finger of a hand.In the figure, an index finger is considered and the angle θ is the Proximal Inter-Phalangeal (PIP) joint angle.u illustrates the direction vector that describes the middle phalanx bone and v illustrates the direction vector that describes the proximal phalanx bone.

C. Definition of a Dynamic Gesture
A dynamic hand gesture is represented as a sequence of postures changing over time and each posture is described by a set of joint angles.Mathematically, a dynamic hand gesture is illustrated using a set of K measured finger joint angles that evolve over time i.e. a dynamic hand gesture g t at an instant t is described by g t = {θ 1t , θ 2t , . . ., θ K t }.

IV. DYNAMIC TIME WARPING A. Problem Formulation for Dynamic Time Warping (DTW)
Our objective is to establish how similar or different a query dynamic hand gesture is in comparison to a reference dynamic hand gesture whilst compensating for differences in the duration of gestures, rotation of the hand, reasonable distance from LM sensor etc.For simplicity, we initially assume the feature vector constitutes only one measured feature in order to illustrate how traditional DTW works.In later discussion, we extend DTW to Multi-dimensional Dynamic Time Warping (MDTW) so that it suits our proposed framework.
We let a query dynamic hand gesture and a reference dynamic hand gesture be represented by X and Y , respectively [36].Specifically X = (x 1 , x 2 , . . ., x M ) where M ∈ N and Y = (y 1 , y 2 , . . ., y N ) where N ∈ N. From now onwards, we use i and j to represent an entry in time series X and Y , respectively.We define the Euclidean distance between any two samples in time series X and Y as [36], where 1 ≤ i ≤ M, and 1 ≤ j ≤ N.
A two-dimensional N by M cost matrix D is created and every individual value of the D(i, j ) is determined as follows: Equation ( 6) holds for the same range of i and j as for (4) and ( 5) i.e. 2 ≤ i ≤ M and 2 ≤ j ≤ N.
Then a warping path W = w 1 , w 2 , . . ., w r is an adjacent collection of some matrix constituents that are always close to the diagonal.These matrix elements when added together are equivalent to a minimum-distance of a warp path.
The minimum-distance of a warp path illustrates a mapping between X and Y that fulfils the subsequent requirements [37].
1) Boundary Requirements w 1 = (1, 1) and w r = (M, N) where r is the length of the warping path.We can now illustrate how to obtain a minimum-distance warp path with an example.Given X = (1,2,4,3,5,3,2,3,2,5) that represents a query series and Y = (1,1,2,4,3,5,3,2,3,2) which represents a reference series, we can construct a cost matrix D. The minimum-distance of a warp path is traced through the matrix constituents from D(1,1) to D(M,N), highlighted in pink, as shown in Fig. 3.The minimum-distance of the warp path using Euclidean distance as a metric is three.The above DTW formulation can only be implemented if a framework considers a single feature alignment i.e. onedimensional measurements [36].

B. Problem Formulation for Multi-dimensional Dynamic Time Warping (MDTW)
Since in our framework, we are considering up to 14 joint angles to describe a dynamic hand gesture at an instant, we employ MDTW.For MDTW, the two time-series X and Y must be initially created as multi-dimensional matrices where each row represents the time-series of a single measured feature and each column represents all the measured features at a given instant.The matrices X and Y can now be written as illustrated below.M and N are samples of dynamic query hand gesture and dynamic reference hand gesture, respectively, and K is the number of measured features being considered.
We now define Euclidean distance between X and Y as The entries in the cost matrix D can then be determined as shown in (4), ( 5) and (6).Then the MDTW algorithm searches for a minimum-distance warp path that runs close to the diagonal line from D(1,1) to D(M,N).The warping path must fulfil all three requirements as described in the case for DTW.If the minimum-distance of a warp path is of a lower value, then the two time-series, i.e. the two dynamic hand gestures being compared, are similar, otherwise the two dynamic hand gestures being compared are effectively different to a quantifiable extent.

V. METHODOLOGY
In our proposed MDTW implementation, we make use of an LM device that can be readily purchased by a patient or clinic at an affordable price [38]- [40].Fig. 4 demonstrates how to configure LM in an experimental setup.In the figure the LM device is attached to a computing device such as a laptop on the right.

A. Architecture of the Proposed System
We obtain an input signal when a hand is placed above the LM that is connected to a computing device using a USB cable.On the computing device, the LM application and a Java customised application are started simultaneously and frames of data that represent palm and finger movements are displayed.We then calculate joint angles of the fingers from the frames of data and, consequently, obtain feature vectors that represent various hand gestures.
After obtaining feature vectors that represent both the dynamic query hand gesture and the dynamic reference hand gesture, we apply MDTW on both feature vectors and the minimum-distance value of a warp path is obtained.The minimum-distance value signifies how similar or different the two hand gestures are.A low minimum-distance value implies the two hand gestures that are compared are similar.On the other hand, a high minimum-distance value implies the two hand gestures vary to a certain extent.Fig. 5 illustrates the architecture of the MDTW comparison process.

B. Description of the Feature Vector
A dynamic hand gesture is represented using a set of fourteen measured finger joint angles that evolve over time.The fourteen finger joint angles that constitute the feature vector are illustrated in Table I.Other features e.g. the angles between the finger and palm position are sufficient to be included in the feature vector.However, we choose to limit the feature vector to only finger joint angles since including other features does not contribute a considerable effect on the experimental results regarding the application of MDTW.

C. Robotic Hand
In order to simulate the repetitive nature of dynamic hand gestures and provision of carefully controlled experimental conditions, we used a robotic hand during data collection.In addition, compared to a human hand, a robotic hand permits gestures to be performed frequently in a short time provided the movements of all the necessary servo controllers are suitably programmed for a specific hand gesture.Furthermore, the dynamic hand gestures are performed with minimum positional or temporal errors and this provides a suitable working environment to reduce "unintentional" errors during experimentation.The robotic hand was fitted with a glove so that it can be easily recognised by the LM.Fig. 6 illustrates the robotic hand performing some dynamic hand gestures.

D. Gestures Under Consideration
We have considered four different dynamic hand gestures.These hand gestures are similar to those implemented in [41] for hand strengthening exercises in chronic stroke patients.Dynamic hand gesture 1 is when a hand is performing a full fist gesture where all the five fingers move close to the palm.Dynamic hand gesture 2 is where only the thumb and index move close to the palm whereas the rest of the 3 fingers remain stationary.Dynamic hand gesture 3 is performed when the middle, ring and little fingers move close to the palm whereas the thumb and index do not move.Finally, dynamic hand gesture 4 involves motion of the index, middle, ring and little fingers moving close to the palm whereas the thumb remains stationary.Fig. 6 illustrates two of these dynamic hand gestures.

VI. RESULTS AND DISCUSSION A. Evaluation of MDTW
Here, we compare a particular hand gesture with itself, meaning the same vector describing how the fourteen finger joints evolve over successive time frames is compared to itself.When the comparison is completed, the minimum-distance value of a warping path obtained is 0 o .This is a perfect result since the similarity is 100%.

B. Comparing Different Gestures to a Reference Gesture
Here we designed 4 different hand gesture comparisons where in comparison 1 i.e. cf.#1, hand gestures 2, 3 and 4 are compared to hand gesture 1.In cf.#2, hand gestures 1, 3 and 4 are compared to hand gesture 2. In cf.#3, hand gestures 1, 2 and 4 are compared to hand gesture 3 and finally in cf.#4, hand gestures 1,2 and 3 are compared to hand gesture 4.

TABLE I FEATURE VECTOR IN THE EXPERIMENTAL SET-UP
From Fig. 7, hand gesture 1 and hand gesture 4 are similar since a minimum-distance of lowest value of 35.9 o is obtained.On the other hand, hand gesture 2 and hand gesture 3 experience the largest variation since a high value of minimumdistance of 248.5 o is obtained.From our experimental design, this makes sense since hand gesture 1 is nearly identical to hand gesture 4 whereas hand gesture 2 can be regarded as the direct opposite to hand gesture 3.

C. Comparing Gestures at Varied Distances From the LM
In this experimental setup we considered four different configurations i.e.D1 is 5 cm to the right of the centre-line of the LM from the middle of the palm of the robotic hand whereas D2 is 5 cm to the left.D3 is 5 cm in front of the centre-line of the LM from the middle of the palm of the robotic hand whereas D4 is 5 cm behind.During the execution of a dynamic hand gesture, we maintained a moderate speed, a vertical distance of 15 cm from the surface of the LM to the palm of the robotic hand, and the robotic hand was fixed in a horizontal position relative to the LM with its palm facing downwards.
For comparison purposes, D1D2 implies the dynamic hand gesture performance at D1 is compared with the dynamic hand gesture performance at D2.This notation is applied to the remaining cases as well, for example D3D4 implies dynamic hand gesture performance at D3 is compared with dynamic hand gesture performance at D4.
From Fig. 8, the minimum-distances range is from around 5 o to 12.5 o .These are quite low values compared to minimumdistance values obtained in Fig. 7 where we compared dynamic hand gestures to a specific gesture.Hence reasonable  distance from the centre-line of the LM to the middle of the palm of a hand does not affect gesture performance.

D. Comparing Gestures at Varied Speeds
In this experimental setup, we arranged four different configurations, i.e.S1 is the baseline case, where a dynamic hand gesture is performed at a slow speed, S2 is when a dynamic hand gesture is performed at a speed twice as fast as a baseline one, S3 is when a dynamic hand gesture is performed at a speed three times faster than the baseline case and S4 is when a dynamic hand gesture is performed at a speed four times faster than the baseline one.
For comparison purposes, S1S2 implies the dynamic hand gesture performance at S1 is compared with the dynamic hand gesture performance at S2.This notation applies to the remainder of the experimental setup, for example, S3S4 implies dynamic hand gesture performance at S3 is compared with dynamic hand gesture performance at S4.During a dynamic hand gesture evaluation we placed the robotic hand at the LM centre-line, maintaining a vertical distance of 15 cm from the surface of the LM to the palm of the robotic hand, and the robotic hand was fixed in a horizontal position with its palm facing downwards.
As illustrated in Fig. 9, the minimum-distances range from approximately 3 o to 11 o .It is important to note that these values are in the same range as those obtained when comparisons are made based on distances from the LM to the robotic hand (Fig. 8).This implies variable speed of hand gestures does not significantly affect gesture comparison performance.

E. Comparing Gestures When the Robotic Hand Is Rotated
In this setup we rotate the robotic hand while performing dynamic hand gestures considering four different scenarios, i.e.R1, R2, R3, and R4.R1 is when the palm of the robotic hand is in horizontal position and facing downwards.R2 is when the robotic hand is roughly rotated at 30 o and its thumb facing upwards.R3 is when the robotic hand is roughly rotated at 60 o and its thumb facing upwards.R4 is when the robotic hand is in a vertical position and its thumb facing upwards.All these rotations are relative to the surface of LM.During this dynamic hand gesture evaluation, we placed the robotic hand at LM centre-line, maintained a vertical distance of 15 cm from the surface of the LM to the palm of the robotic hand, and maintained a moderate speed.
For comparison purposes, R1R2 implies the dynamic hand gesture performance at R1 is compared with the dynamic hand gesture performance at R2.This notation applies to the remaining cases as well, for example R3R4 implies dynamic hand gesture performance at R3 is compared with dynamic hand gesture performance at R4.
As shown in Fig. 10, the minimum-distances range from approximately 4 o to 14 o .These minimum-distance values are in the same range as those in Fig. 8 and Fig. 9.However, it is important to note that the RIR2 comparison registers the lowest minimum-distance values.On the other hand, RIR4 registers the highest minimum-distance values.This may suggest that a physiotherapist should encourage patients to avoid unnecessary rotations of their hands.
From the preceding analysis, regarding comparisons between gestures that are supposedly performed by patients with those that would be recommended by a physiotherapist, we observe that there is no concern about requiring a patient to maintain a particular horizontal distance from the LM to their hand for sensible rotations of the hand, and varying speed of gestures performed by different patients with various kinds of hand related injuries, as these factors do not significantly affect the gesture comparison.However, it is important to note that we maintained vertical distances around 15 cm from the surface of the LM to the palm of the robotic hand in all our experiments due to our previous work [17], where we established that accurate LM readings are obtained around this height.

F. Detailed Comparison for Hand Gestures
Here we undertake a comparison of all the four dynamic hand gestures performed in all the scenarios we explained in subsections C through to E i.e. at various distances, at various speeds, and at various rotations.For each of the four dynamic hand gestures, both query and reference gestures were at D1, D2, D3, D4, S1, S2, S3, S4, R1, R2, R3, and R4.
For gesture 1, the lowest minimum-distance value is 0 o and the highest value is 12.8 o .For gesture 2, it was observed that the minimum-distance values range from 0 o to 18.2 o .For gesture 3, the minimum-distance values range from 0 o to 17.4 o and for gesture 4, the minimum-distance values range from 0 o to 18.8 o .0 o was obtained when a dynamic hand gesture was compared to itself in the same scenario under the same conditions.This is expected since the similarity is 100%.The same scenario same condition situations were when, for example, a query at D1 was matched with a reference at D1, or a query at R1 was compared with a reference at R1, etc. Furthermore, minimum-distance values are lower compared to those obtained when comparison is made between different hand gestures.This signifies the acceptable distance from the LM to the hand and indifference to speed of hand gestures during rehabilitation hand exercises.Sensible rotations of the hand also have little impact on hand gesture comparison performance.

G. Experimental Limitations
Although the four different hand rehabilitation dynamic gestures were sufficient for the implementation and evaluation of MDTW, it could have been a good idea to extend the number of gestures.In this study we were constrained by the robotic hand performing only flexing and extending finger gestures.It was unable to execute complex hand gestures like abduction and adduction of fingers.Further, there was no need to recruit patients with hand related injuries like those recovering from stroke though if patient evaluation was considered could have added more significant benefits in the field of hand therapy.

VII. CONCLUSION AND FUTURE WORK
We have proposed, implemented and evaluated Multidimensional Dynamic Time Warping (MDTW) to establish how similar or different a query dynamic hand gesture could be in relation to a reference dynamic hand gesture.The approach is robust in the way that it can distinguish quite different hand dynamic gestures by yielding a high value of a minimumdistance metric.Furthermore, the method can produce a low value of a minimum-distance if the hand dynamic gestures under comparison are closely similar.Therefore, in the context of dynamic rehabilitation hand gestures performed by a patient and compared with reference gestures recommended by a physiotherapist, meaningful feedback can be generated concerning how well the patient is mimicking the reference gestures.
In the future we shall extend on the kinds of hand gestures by possibly improvise another different robotic hand that can perform abduction and adduction of fingers gestures.It would also be relevant to recruit both patients with hand related injuries and healthy individuals and evaluate how the two groups perform hand rehabilitation gestures.Obtained results can help a physiotherapist generate a more realistic feedback to the patient.Finally, since the recognition rate in LM could slightly vary depending on the speed of hand gestures, this can also be an interesting area for future research.

Fig. 2 .
Fig. 2. Calculation of the PIP joint angle θ of the index finger.

2 )
Continuity Conditions Given w z = (a, b) and w z−1 = (a , b ), then a − a ≤ 1 and b − b ≤ 1 must be fulfilled.3) Monotonicity Requirements Given w z = (a, b) and w z−1 = (a , b ), then a − a ≥ 0 and b − b ≥ 0 must be satisfied.

Fig. 3 .
Fig. 3. Cost matrix and the minimum-distance of the warp path.

Fig. 4 .
Fig. 4. A hand above the LM device in an experimental setup.

Fig. 6 .
Fig. 6.Some of the hand gestures used to facilitate implementation of MDTW.