A Distributed Gamified System Based on Automatic Assessment of Physical Exercises to Promote Remote Physical Rehabilitation

,


I. INTRODUCTION
In Europe alone, the estimated cost of physiotherapy to healthcare systems for the 179 million European citizens that live with a neurological condition is e798 billion to support [1]. Many require physical rehabilitation on a daily basis. In Spain, as a way of example, the average cost of treating a single stroke patient is estimated at e27,711 a year [2]. Stroke patients suffer from a number of problems, including physical The associate editor coordinating the review of this manuscript and approving it for publication was Aneel Rahim . problems such as weakness and paralysis of one or more limbs, spasticity, instability, and changes in sensation. Weakness and paralysis are managed through physiotherapy. The incidence of stroke is increasing worldwide, particularly in low-and middle-income countries [3]. There is no doubt an unmet clinical need to be addressed [4].
Physical rehabilitation helps regain mobility and muscle control, improves balance and ultimately enhances the quality of life of patients. Rehabilitation requires that the patient performs prescribed exercises repeatedly. For example, a stroke patient will be assisted initially during face-to-face sessions in clinic guided by a physiotherapist and instructed to continue exercising at home. Unfortunately, patients do not always receive the recommended amount of therapy for a variety of reasons, including costs, availability of therapists in remote areas, or non-adherence to the prescribed therapy due to lack of motivation [4].
Technological solutions that support home rehabilitation go some way in addressing these problems, but there are important challenges relating to acceptance and adoption that are difficult to tackle. One problem is the patient's reluctance to use technology. The reasons for this are varied and include digital literacy, the perception of the intrusiveness of video systems and the inconvenience of wearable devices and so on. Another major challenge is to demonstrate the benefits of using such technologies to patients thereby improving physiotherapy compliance. This paper describes the use of gamification to improve compliance.
This article presents a system designed to support remote physical rehabilitation (home rehabilitation), which is capable of automatically recognizing, comparing and evaluating the exercises in real time during a rehabilitation sessions. Exercise recognition is achieved by comparing the limb motion with predefined reference exercises. This comparison uses a variant of the DTW (Dynamic Time Warping) algorithm [5]. In computational terms, an exercise can be described by the motion of body parts (e.g. arm) and joints (e.g. elbow) that can be tracked; the term skeleton tracking is used. As such, each exercise can be described by a time series, allowing the limb/joint motion to be compared to either a reference motion for the purpose of exercise recognition or against the patient's previous attempts to detect progress (or lack of).
The system is low-cost and modular. The system will operate with any limb/joints tracking device. The interface is webbased, the user interacts via a browser. The system is scalable; it allows the integration of new movements and the definition of new physiotherapy routines. The system allows remote assignment, supervision, and monitoring by the physiotherapist. Preliminary evaluation with rehabilitation routines are conducted with multiple users (n = 27).
The system is designed around the Microsoft Kinect device which provides skeleton tracking without the use markers or other wearables. The Kinect output is joint trajectory information. Although a camera-based system, such as the Kinect may be considered to infringe on privacy, it does provide much richer information than a less intrusive system based on devices such as IMUs and unlike the latter there is no worn component/sensor and therefore easier to use.
Motivation is a key issue in adherence to rehabilitation. The system described in this paper addresses motivation through gamification. It motivates the patient to participate and offers visual feedback of to the patient on their performance. The strategy employed for maintaining or increasing motivation is to provide the patient with a visual indication of performance and progress through a graphical user interface. Progress shown is a function of the DTW comparison algorithm output. It is important to reward any attempt.
The rest of the paper is structured as follows. Section II performs a review of the main research topics relevant to this work. Section III discusses the proposed architecture, while section IV details the main characteristics of the module responsible for comparing exercises, as well as the technical details of the automatic exercise recognition module. Subsequently, in section V the system is evaluated in terms of performance, usability and ease of use. Finally, section VI summarizes the main contributions of this work and introduces possible lines of future work.

II. RELATED WORK AND BACKGROUND
There are a number of tools addressing clinical or sports rehabilitation. This work focuses on clinical needs. Typically, the exercise performed by a patient is monitored and assessed employing computational methods [6] using either physical (worn) sensors for tracking the joints [7] or computer vision techniques [8]. In the systems in the latter group often use the Kinect device [9]. The Kinect is a low-cost camerabased system; its effectiveness has been shown in the field of physical rehabilitation [10], [11].
The Kinect device originally developed for entertainment, has received much attention and is now the most widely used in technology-supported rehabilitation [11] as alternative. The Kinect, has been the subject of numerous research works in the field of rehabilitation [9]. The reliability and validity of measurements are key. [12] investigated the accuracy of the Kinect joint tracking thereby producing a tool to check suitability of the Kinect for any given health application. Along the same lines, [10] demonstrated the validity of the Kinect for posture evaluation by comparing it to a motion tracking systems that use markers. Several examples of using the Kinect in clinical settings have been reported. [13] monitor patients with psychomotor problems, such as body scheme disorders and left-right confusion. The system was evaluated with a group of 15 users with promising results. [14] investigated the feasibility of using a Kinect for unsupervised rehabilitation by analyzing the hand movement of a stroke patient while moving a virtual square inside a defined area. Similarly [15] investigate the use of the Kinect for rehabilitation in stroke patients but focusing on balance. The system was evaluated with 13 users who demonstrated some improvement following the sessions.
Recent years has seen a steady increase in the use of and types of technologies employed in rehabilitation [16]. According to [17] technology can help stroke patients regain some function during the recovery phase. Among the most common devices aimed at injury recovery are orthoses, exoskeletons, and other stationary equipment [18]. The stationary equipment require attendance at a clinic. This may impose limits on the frequency of sessions and hence recovery. Aside from the Kinect other low cost entertainment devices have been re-purposed for rehabilitation. In [19] a study using the Nintendo Wii TM is conducted with 41 patients VOLUME 8, 2020 lasting 14 days to demonstrate the effectiveness of the device as a rehabilitation tool. Similarly the PlayStation Move TM , is used in [20] for burn rehabilitation. In [21] the Leap Motion TM device is used in conjunction with a video game to obtain information of a patient's hand movement to monitor the performance of the exercises.
When monitoring the patient as they perform an exercises, the goal is to determine how well they are performing with respect to a reference which could be the patient on a previous day. The tracking of a limb in motion, in other words, the joint position trajectory can be expressed as time series. Comparison of time series can be performed automatically without having to previously define a set of rules. [22] use the DTW algorithm to compare the joint trajectory during the execution of the exercises against the previously recorded reference. [23] compare joint trajectory using Hidden Markov Model (HMM) [24]. Both approaches are widely used to compare movements over time, although DTW-based implementations in general provide better results than HMM-based analogues [25] depending on the nature and quantity of the data to be processed [26].
Another advantage of DTW is that identifying and classifying movements can be achieved automatically without the need for explicitly training the system as described in [27]. In this work, the exercise recognition is divided into into three stages using the DTW algorithm, the patient's initial and final postures are compared, together with the angular trajectories of the extremities involved in the exercise. In [28], a variant of the DTW algorithm is presented for comparing incomplete time series called Open-End DTW (OE-DTW). The technique was successfully validated through the classification of exercises used during the rehabilitation of stroke survivors, irrespective of whether the exercise was performed correctly or incorrectly. [29] propose an exercise classifier based on fuzzy logic to solve the classic problem of overlapping body parts. This would be an example of fuzzy pattern recognition [30]. Other authors combine the use of fuzzy logic, to deal with the uncertainty and vagueness of the data obtained by the tracking system, with the DTW algorithm to make a comparison of the exercises performed by a patient with respect to the reference exercise [31].

III. ARCHITECTURE A. OVERVIEW
A scalable architecture is proposed, shown in Figure 1 to remotely monitor patients as they perform an exercise. Patient movement is analyzed automatically and feedback is immediate following completion of exercise. The exercises are recognized automatically during their performance. Thus, the patients can perform any prescribed exercises without informing system. Finally, the results obtained are sent to the therapist for the assessment of the patients.
The comparison mechanism is achieved by applying the DTW algorithm to the exercise motion as performed by the patient and a reference e.g. patient on a previous day or phys-iotherapist. The solution includes different gamification techniques to enhance patient engagement and motivation thereby improving adherence.
Regarding the classification of exercises performed by the patient, the system is able to automatically recognize them. In other words, there is no need for the patient to explicitly select which exercise will be done next. On the contrary, the system can classify the movement made by the patient according to the most similar exercise existing in the data base. This feature, which may help patients with cognitive problems that affect speech to interact with the system in a more natural way, is currently at experimental stage and has to be explicitly enabled by the user through the system settings. More details about it are provided to the reader in section IV-B.

B. ARCHITECTURAL DESIGN
The system was designed and implemented for ease of scalability and modularity. To this end, a multi-layer architecture was proposed with three modules having well-defined functionality to meet the key requirements of the system.
Given the requirement for remote monitoring, the architecture has to offer full network functionality. This network architecture implements two distinct roles, one for patient and another for clinician roles. The system interface is webbased so that both patient and clinician interact with the system via a web browser. The interface shows role-specific actions determined by role, that is, patient or clinician. The clinician's interface allows i) the creation of recording of exercises, ii) assigning (prescribing) exercises to a patient and iii) monitoring their progress (viewing patient's assessment). The patients' interface, allows viewing prescribed exercises, ii) view own results, and iii) view their progress. The patient's view incorporates gamification element to enhance motivation.
The implementation consists of three independent but connected modules. Information flow between modules is multilayered and bidirectional. The implementation is described below.
• Capture module communicates with the capture device to retrieve RGB images and skeleton (joint tracking) information for further analysis. The module also detects voice commands sending them to the processing module.
• Processing module processes the information received from the capture module. Its responsibilities include storing the information in the defined exchange format, automatically comparing exercises using the appropriate algorithm, classifying the exercise and executing the detected voice commands.
• Display module supports user interaction, provides visual feedback on the patient's performance using gamification techniques.
To share information between the different modules, network sockets are used as the inter-process communication (IPC) mechanism. This has an advantage when scaling the system horizontally, where each module can run on different working nodes, in case of low performance equipment. The data-flow diagram is shown in Figure 2, which shows the complete flow of information that takes place in the system.
In addition to network sockets, the display module also makes use of WebSockets technology to communicate with the web application and to transmit information to connected clients. This application provides the graphical interface and the common user entry point to the system.
The capture module implements motion capture retrieving color images and skeleton and joint tracking information from the Kinect. When the capture module identifies a human skeleton, the position and rotation of each of its joints (3-D pose estimation) is recovered. This information is serialized and sent to the processing module, where it is stored in the defined exchange format.
Both clinician and patient roles can interact and use the motion capture functionality. The clinician captures an exercise using the video recording function. This exercise is interpreted as as a reference to demonstrate to the patient or compare to the patient's exercises. The exercise is stored in BioVision Hierarchy (BVH) format [32], which maintains the 3-D transformation (position and rotation) of each joint hierarchically over time, in order to overlay the captured joints over the recorded video.
The hierarchy of joints to be stored depends directly on the exercise recorded. Thus, for exercises involving, for example, upper body movements, only those joints are stored. The selection of joints can be established by the therapist prior to recording the reference exercise.
Along with the BVH file, a new JSON file is also generated, for the sole purpose of storing the positions of each joint following the same sequence defined in the BVH file in order to be used as input to the exercise comparison algorithm, which will provide users with feedback on the correct execution of the exercises. This file serves the comparison algorithm.

IV. REMOTE REHABILITATION A. EXERCISE COMPARISON
A variant of the DTW algorithm [5], FastDTW version [33], which offers a linear temporal order of complexity is employed to automatically analyze and evaluate the exercises performed by the patient.
The algorithm provides the optimal alignment of two time sequences by calculating a cost matrix obtained from the difference between two data point indices in the sequences. The algorithm removes the time dimension thus providing results independent of the time difference between the two sequences. This makes it especially useful for comparing time series, such as speech recognition and audio synchronization.
The exercise analysis process involves comparing the exercise performed by the patient, noted as r, with the reference, noted as m.
An exercise movement consists of a set of time stamped points, one for each of the joints involved in the movement (see Figure 3). Each set is a temporal sequence of 3-tuples (x, y, z) ∈ R 3 , which indicate the position of the joint associated with the series at a given instant obtained from the depth sensor camera. The values on each axis represent the position of the joint over time on that axis and can be viewed as a trajectory or curve. In this way the problem of movement VOLUME 8, 2020  comparison can be seen as a time series comparison problem. The DTW algorithm allows two time series to be compared by measuring the similarity between two temporal sequences, which may vary in speed i.e. irrespective of the time difference between the two sequences, namely, dist numerical results after the comparison of both series such that dist ∈ Q ≥0 . Figure 4 shows two curves generated along the Y-axis for the right elbow joint (point 10) during an exercise in which the right arm is raised. The dashed curve corresponds to the movement performed by the therapist (reference exercise), while the continuous curve corresponds to that of the patient (exercise to be compared). The alignment of both curves obtained after the application of the DTW algorithm (dist = 5.2) is represented by the segments joining the curves. This value indicates the distance between the two curves, so the closer this value is to 0, the greater the similarity between the two exercises, and the less significant differences will exist between the two curves. This dist value is calculated by the algorithm using as a metric the Euclidean distance between the curves. The comparison, at exercise level, is made by comparing the curves in the X, Y and Z axes of the movements made by the patient r and the therapist movement m in each of the points of the joint scheme (points 1 to 20) involved in the movement, applying the DTW algorithm to each joint independently. For each series, that is, for each movement of a joint i in the exercise we obtain a distance that considers the distances in the axes X, Y and Z of that joint; this distance is noted as d DTW i .
Finally, the overall distance between the exercise performed by the patient r and the reference movement of the therapist m is calculated as the arithmetic mean of the distances obtained in each of the joints involved in the exercise being j the total number of joints.
The algorithm does not establish an upper limit to define a confidence interval for interpreting the results obtained. To overcome this limitation, a calibration phase is integrated to normalize the results. In this phase, the therapist has to perform a calibration exercise correctly, and then perform it incorrectly (e.g. by remaining still). In this way, a lower limit close to 0 is obtained after performing the exercise correctly, and a higher one after performing it incorrectly. Once this threshold is defined, it is divided into equal intervals and each of them is associated with the corresponding feedback that would be provided to the patient. Thus, if the distances obtained by applying the DTW algorithm to the calibration exercise are d r , exercise performed correctly, and d w , exercise performed incorrectly, the confidence intervals would be calculated by obtaining a margin of error, e, that serves to relax the interpretation of the results obtained by the patient when performing the exercises. From this margin of error, the lower and upper limits of the intervals would then be calculated from the addition between the correct and incorrect distances divided by the number of intervals we want to define (which in the case of this work is 3), as shown in equation (1).
Thus, the first interval would indicate a correct execution of the exercise, the second interval would indicate an acceptable execution and the third interval would indicate an incorrect execution. In this way, the feedback provided to patients in those intervals is discretized, depending on how they perform the exercises. This way of defining the intervals is flexible enough to prevent the scores obtained by the DTW algorithm from being misinterpreted as closer to the interval limits. Once the calibration is complete, the intervals obtained are sent to the patient, so she/he can proceed to perform the assigned exercises, from which the system will provide an appropriate evaluation based on performance.
In addition, the joint positions must be normalized to avoid possible computational errors caused by a change of location of the patient or therapist with respect to the camera. To do this, these positions are recalculated with respect to one of the joints of the individual that does not affect the movement of the exercise, by default, the joint at the base of the neck. This allows both calibration and reference exercises to be recorded remotely by the therapist for the patient to repeat, making it possible to compare the two results.

B. EXERCISE RECOGNITION
Currently, in the proposed system, the patient must select the exercise to perform, by voice commands or the user interface. Voice or touch interface may not be suitable for patients with more severe physical or cognitive disability. A mechanisms that eliminated the need for the patient to select and exercise is required.
The standard DTW algorithm operates on finite time series in other words on a completed exercise. The Open-End DTW (OE-DTW) by Tormene et al. [28], a variant of DTW allows comparison on incomplete time series. It provides the percentage of coincidence between two curves at every time instant of the series. This feature can be used to allow the comparison to begin as soon as movement is detected and continues so that it is not necessary to manually select an exercise. In addition, the OE-DTW algorithm can be used to identify the exercise attempted by the patient by comparing the incoming tie series it to all predefined reference. As the exercise progresses, more data will be collected to establish a more informed comparison.
In normal operation, the patient would initiate the movement of the exercise he/she wishes to perform and the system would detect the exercise being performed. To do this, the system periodically compares the positions of the joints with those stored for existing reference exercises. When an optimal candidate is found, the exercise corresponding to that candidate is marked as definitive and on completing the exercise, the patient is informed of their performance. An optimal candidate is considered to be the reference exercise that minimizes the distance between the joint trajectory of patient and reference as indicated by OE-DTW algorithm.
Formally, suppose the system has stored n rehabilitation routines which have been performed by the therapist: M = {m 1 , m 2 , . . . , m n }. And that the patient performs an exercise r. The problem is to find the model m i such that min i {D(r, m k )}. An exercise can be seen as a set of series S i , that is, where each S i is the series containing the joint trajectory i involved in the exercise identified by the capture device (see Figure 3). The series S i consists of being e t j each of the positions of the joint i over time, i.e. e t j = (x t j , y t j , z t j ) | x t j , y t j , z t j ∈ R where x t j , y t j and z t j represent the position of the joint in the X, Y and Z axes at the instant t j , respectively.
Thus, the problem is to compare the partial joint trajectory of the incomplete exercise performed by the patient r with those of reference (M ) up to the instant t j . The resulting OE-DTW distance value between exercise r and a model m i in an instant t j is calculated as where dt j DTW i calculates the distance between r and m in joint i for the exercise accounting for the distances in axes X, Y and Z at time instant t j .
At each time instant t j the system selects as a model for the movement executed by the patient, the model m k that minimizes the distance D t j (r, m k ), that is: As an example, if we consider a use case in which the patient has to perform repetitions of up to three different exercises (e.g. greeting with the right arm, raising the right VOLUME 8, 2020 arm and advancing the right arm forward), the implementation would have to find the best candidate while the patient performs the exercise over time. Therefore, when the user begins to perform a repetition for the exercise in which she/he has to wave the right arm, a comparison process is launched using the OE-DTW algorithm to try to classify the movement from the positions (x, y, z) of each of the joints, detected until that time instant. Several comparisons are then made in parallel with each of the reference exercises defined above. The minimum distance obtained after applying the algorithm to the three reference exercises will be the one that indicates the exercise that has been recognized.

C. MOTIVATION AND GAMIFICATION
Patient motivation is essential for a positive outcome in rehabilitation in general and more so in remote rehabilitation. Gamification has been shown to play an important role on positive psychological effects of engagement in rehabilitation [34]. In this context, elements of gamification and serious games can contribute to engage the patient, especially when performing repetitive exercises during a long period of time [35].
The system does not require the patients to attend the rehabilitation center physically, so it must be capable of motivating patient to ensure compliance to prescribed physiotherapy. For this, the system provides different gamification mechanisms to maintain the patient's motivation as shown in Figure 1: • Feedback based on stars: the results of assessing the patient performance is the DTW distance. The star feedback system translates this number into a meaningful and understandable format for the patient. The number of stars the patient receives (i.e. minimum 1 and maximum 3) is determined by the DTW distance obtained from applying the algorithm when comparing the exercise performed by the patient with the reference. Thus, the number of stars is related to the three intervals defined during the calibration process. Patients are motivated by the systems in order to obtain the maximum number of stars per exercise.
• Scores, high scores and multipliers: the scores are directly related to the number of stars obtained per repetition. The equation for the score is where s base is a constant base score value assigned to each interval resulting from calibration (i.e. 100, 200 and 500), d DTW is the DTW distance scaled to an interval [0.1, 1.1] and m is a multiplier that initially takes the value of 1 and increases to a maximum of 4 for each successful repetition, i.e. when the distance obtained falls over the second or third calibration interval. Although the score is a numerical representation of the obtained number of stars, registering high scores can motivate patients to make an extra effort when performing the same rehabilitation exercises day after day.
• Experience bar and level: to provide a sense of progression to the patient, the system incorporates a system of levels that the patient can reach by filling in an experience bar. This gamification technique is oriented to maintain the patient's engagement over long period of time. This bar is filled at the end of a rehabilitation session with the sum of the scores obtained during the routine according to the formula where x i is the total amount of experience required to reach the i level, x base is a constant amount of experience (x base = 1000), t is the target level to reach and k is a constant (k = 1.5) used to exponentially increase the difficulty needed to reach the next levels. The variable x base is only used to reach level 2; in subsequent levels this variable is adjusted automatically based on the total score obtained by the patient during their rehabilitation session in order to adapt the difficulty to their needs. The levels represent the main objective that the patient must achieve, as their attainment implies that rehabilitation routines are being performed. In the same way, the physiotherapist can define achievements or rewards that the patient will unlock when reaching certain levels. These achievements are a useful indicator for the patient regarding progress in rehabilitation.

A. ALGORITHM PERFORMANCE
The comparison of the exercises performed by the patient with the reference exercises is implemented with the DTW algorithm applied to (x, y, z) of the joint trajectories. Computation begins on completion of the first repetition of exercise followed by feedback to patient. This process is repeated for each repetition.
The duration of the computation should be as short as possible to provide a satisfactory user experience for the patient, and there should no interruptions between repetitions. The system was evaluated with a series of tests based on 7 upper trunk exercises with up to 3 repetitions. The selection of exercises for the evaluation was based on the approximate duration of the exercise and the joint trajectories during the exercise. Table 1 shows the results of the repetitions at the exercise level. The data collected were duration of the movement and the execution times of the DTW algorithm for each repetition.
The algorithm execution times vary between a minimum of 817ms and a maximum of 5002ms for the proposed exercises. The relationship between execution time, duration of exercise and number of joints involved was investigated. The correlation coefficient between the duration of the performed exercise and these execution times was to be r = 0.9595, indicating a strong positive correlation between  these variables. This is explained by the number of samples accumulated during that time (i.e. positions of each joint over time). It was found that the execution time of the algorithm is not impacted to the same extend by the number of joints involved in the movement studying this correlation (r = 0.4569). Figure 5 shows a graphical representation for both cases.
These results demonstrate that the system can successfully compare exercises that include an arbitrary number of joints in their movements without compromising on computation speed. In addition, the algorithm execution times are acceptable given a real scenario where the patient would take breaks between repetitions.
The exercise recognition function was evaluated in two tests. In the first test, the exercise to detect and recognize was waving with the right arm in a set comprising 7 exercises and in a second test, the set comprising 3 exercises. In these tests, the running time of the OE-DTW algorithm was collected, as well as the results of the comparison at successive time intervals.
For the test to be successful, the exercise had to be recognized in less than 10 seconds, or in other words, in less time than the duration in which the reference exercise was recorded.
The charts in Figure 6 show the results obtained. In the first test with 7 reference exercises (left), the distance values are quite close and the exercises are clearly distinguishable at beyond 6 second at which point the exercise is correctly recognized, that is, the difference between the distances obtained by the OE-DTW algorithm are significantly lower than those obtained after comparing with the other reference exercises. In the chart corresponding to the 3 reference exercises (right), this difference can be seen more clearly. The execution times of the algorithm (lower horizontal axis) increase as the duration of the movement increases, as demonstrated in the previous comparison tests. An additional correlation between the algorithm execution time and the number of existing reference exercises can also be seen in this case. This is due to the fact that the number of comparisons that the algorithm performs grows linearly according to the number of exercises assigned to the patient's exercise routine.
All the tests in this section were performed on a workstation equipped with an Intel Core i7-7700 and 16 GB of RAM running a 64-bit version of Windows 10. The system makes use of the OE-DTW algorithm available in the software package statistical, available for the programming language R [28].

B. PRELIMINARY CLINICAL EVALUATION
The system has been evaluated in terms of its usefulness and ease of use by a number of participants (n = 27) selected taking into account their own experience of attending rehabilitation sessions following recent of historical physical injuries. Participants consisted of 16 men and 11 women, ranging in age from 22 to 51. The main reasons for attending physical rehabilitation sessions include ankle sprain, wrist injuries, low back pain, epicondylitis, cervical pain and fiber rupture, among others. This evaluation was conducted to examine the potential benefits that the system can provide to patients that require physical rehabilitation and can carry out the exercises at home.
Participants performed a two-exercise routine. The first of them had to be repeated 3 times and consisted of waving with the right arm, lifting it above the head. The second had to be repeated twice and consisted of moving the right arm back and forth. These exercises were simple enough for the participants to understand their execution without any problem, thus trying to focus their attention on the system itself rather than on the execution of the exercises. After that, they filled in a questionnaire with questions based on the TAM framework [36] to measure the perceived usefulness and the perceived ease-of-use of the system. These questions were scored on a Likert scale ranging from 1 (totally disagree) to 5 (totally agree).
The results obtained following analysis of the questionnaires are shown in the Table 2. The mean values for the statements are higher than 4 points in most cases, indicating a positive view of the system by users. Only the PEOU4 statement has the lowest score (3.13), with the highest standard deviation (1.13). Even so, we can conclude that these results are satisfactory, since the system is not intended to replace face-to-face rehabilitation sessions with the therapist, but to complement them in order to democratize access to physical rehabilitation for people who cannot attend face-to-face sessions in the rehabilitation center.
The participants also left some open comments, indicating what they liked and disliked about the system. In the first case, the positive comments referred to how motivating it was to perform the rehabilitation routine thanks to the gamification mechanisms, specifically, the scores and multipliers; to the ease of understanding and replicating the exercises thanks to the demonstrative videos; and to the visualization of the joints on the video while the exercise is being performed. Regarding the negative comments, the participants indicated that would also wish to exercise the lower part of the human body; for certain users, the tracking of the skeleton made by the capture TABLE 2. Statistical values relating the ''Perceived usefulness'' and ''Perceived ease-of-use'' dimensions to the scores provided by the participants using the system (1: totally disagree, 5: totally agree). Numbers in parentheses denote standard deviations. device produced incorrect positions for certain joints, mainly those of the wrists.

VI. CONCLUSIONS AND FUTURE WORK
This paper presents a distributed gamified system to support home-base rehabilitation, by remotely monitoring rehabilitation workouts as prescribed by a physiotherapist. Motivational aspects have been given special consideration to engage patients when making exercises and scalability designed-in to extend the system functional capabilities as required.
The system automatically compares and evaluates the exercises performed by the patients to provide them with appropriate feedback. In addition, the system can recognize the exercise performed by the patient, so as it is not necessary to select the exercise to be performed at start. The gamification system offers a motivating function that promotes compliance and improves adherence to ensure a positive outcome. In addition, the functionality of the system can be extended. The modularity allows modules to be exchanged to improve certain characteristics, such as, for example, the algorithm used to analyze exercises or the module responsible for recognizing the human skeletons of the users, among others. Moreover, the success of the evaluation testing conducting demonstrate the potential of this type of systems in healthcare, in order to facilitate the rehabilitation of patients and to monitor their recovery.
The system continues to be evaluated with more participants, specifically with stroke patients from the General Hospital Nuestra Señora del Prado 1 (Talavera de la Reina, Spain). The goal is to evaluate not only from a technological perspective identifying possible technological and functional improvements but from a clinical perspective in a clinical study to determine usefulness for both patients requiring physical rehabilitation and clinicians in the mid-term. This is essential within this context of patients affected by neurolog-ical diseases, which represent the largest cause of disability worldwide.
As future work, the exercise comparison mechanism is intended to be evolved into a learning-based solution that automatically weigh the joint positions based on how much they are involved during the exercise performance, so that even more accurate and faster results can be obtained. In addition, pattern recognition techniques are intended to be used in order to infer personalized rehabilitation routines depending on each patient's needs and their ability to adjust to rehabilitation treatments.