0% found this document useful (0 votes)
98 views50 pages

Masters Project Final Report December 2014: MIT MCS

This document is a final report for a Master's project titled "Ultimate Virtual Trainer". It was authored by R.G.P. Ranathunga in December 2014. The project aimed to develop a new method for monitoring workouts to prevent injuries using a domestic workout monitoring system. The system combines the Microsoft Kinect and Arduino to track movement and provide real-time feedback. The accuracy of workouts is evaluated by comparing key joint angles of practitioners wearing a haptic feedback device to those of a physiotherapist. Results suggest the system with haptic device has less significance in improving body posture than without.

Uploaded by

hvalola
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views50 pages

Masters Project Final Report December 2014: MIT MCS

This document is a final report for a Master's project titled "Ultimate Virtual Trainer". It was authored by R.G.P. Ranathunga in December 2014. The project aimed to develop a new method for monitoring workouts to prevent injuries using a domestic workout monitoring system. The system combines the Microsoft Kinect and Arduino to track movement and provide real-time feedback. The accuracy of workouts is evaluated by comparing key joint angles of practitioners wearing a haptic feedback device to those of a physiotherapist. Results suggest the system with haptic device has less significance in improving body posture than without.

Uploaded by

hvalola
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 50

Masters Project Final Report

December 2014

Project Title Ultimate Virtual Trainer

Student Name R.G.P. Ranathunga

Registration No. 2012/MCS/055


& Index No. 12440558

Supervisor’s Dr.G.D.S.P. Wimalaratne


Name

Please Circle the Master’s Program Type


appropriate
MIT MCS Research Implementation

For Office Use ONLY


Ultimate Virtual Trainer

R.G.P. Ranathunga
2015
Ultimate Virtual Trainer

A dissertation submitted for the Degree of Master of


Computer Science

R.G.P. Ranathunga
University of Colombo School of Computing
2015
Declaration
The thesis is my original work and has not been submitted previously for a degree at this or any other
university/institute.

To the best of my knowledge it does not contain any material published or written by another
person, except as acknowledged in the text.

Student Name: R.G.P. Ranathunga

Registration Number: 2012/MCS/055

Index Number: 12440558

_____________________

Signature: Date:

This is to certify that this thesis is based on the work of

Mr. /Ms. R.G.P. Ranathunga

under my supervision. The thesis has been prepared according to the format stipulated and is of
acceptable standard.

Certified by:

Supervisor Name: Dr.G.D.S.P. Wimalaratne

_____________________

Signature: Date:

i
Abstract

The aim of this thesis is to investigate new method in monitoring workout to prevent workout
related injuries. The main focus was to domesticate the workout monitoring system.
Innovation of the Microsoft Kinect device has provided a low cost movement tracking system
allows the domestication of such system. Literature review elaborates a gap in the real time
feedback system in workout monitoring systems. This thesis combines Kinect and Arduino to
create workout monitoring system with real time feedback system. Accuracy of the workout is
measured using variation of the key joint angles compared with a physiotherapist’s workout
routine. Evaluation of the thesis project carried out using practitioners to perform workouts
wearing haptic device and without wearing the haptic device. Occurrence of errors and the
variation range of the practitioner’s joint angles when compared with the physiotherapist’s
joint angle is used to measure the effectiveness of the project. The results suggest that the use
of Workout monitoring system with the haptic device have less significance in the
improvement of body posture of the practitioner.

ii
Acknowledgements

I am very grateful to my supervisor Dr. Prasad Wimelaratne Senior lecturer of University of


Colombo School of Computing, for giving me this opportunity. As a supervisor he gave me a
great help in solving issues that I came across and encouraged me to do the research properly.
I am very much thankful to him for providing me the guidance to make my effort a success.
I also convey my gratitude to SLt C.L.K. Bandara of Sri Lanka Navy for providing guidance
in the field of electronics and also to Capt R. Darshika of Sri Lanka Army for to providing
instruction on physiotherapy. I would also like to thank undergraduate students of University
of Colombo Faculty of medicine who willingly participate in this project evaluation.

I am especially grateful to my family for providing me a great help and encouragement at


every moment. They played a key role in my success. It is also very much important to pay
my gratitude to my friends and colleagues who helped me to make my research a success.

iii
Table of Contents
Abstract .................................................................................................................................................... ii
Acknowledgements ................................................................................................................................. iii
Table of Contents .................................................................................................................................... iv
List of Figures .......................................................................................................................................... v
List of Tables........................................................................................................................................... vi
List of Abbreviations............................................................................................................................... vi
1 Introduction ......................................................................................................................................1
1.1 Motivation ................................................................................................................................2
1.2 Objectives and Scope ...............................................................................................................2
2 Background ......................................................................................................................................4
2.1 Body Posture ............................................................................................................................4
2.2 Related Work............................................................................................................................5
2.3 Play as motivation to exercise............................................................................................... 10
3 Design of solution ......................................................................................................................... 12
3.1 Calculation of joint angles ..................................................................................................... 13
3.2 Workout Record System ....................................................................................................... 14
3.3 Workout monitoring system ................................................................................................. 16
3.4 Haptic Device......................................................................................................................... 17
4 Implementation.............................................................................................................................. 19
4.1 Workout Record System ....................................................................................................... 19
4.2 Workout Monitoring System ................................................................................................. 20
4.3 Haptic Device......................................................................................................................... 22
5 Evaluation ..................................................................................................................................... 25
5.1 Experimental setup ............................................................................................................... 25
5.2 Results ................................................................................................................................... 26
5.3 Observation ........................................................................................................................... 28
6 Conclusion & Future Work ........................................................................................................... 31
6.1 Conclusion ............................................................................................................................. 31
6.2 Future works ......................................................................................................................... 31
7 Appendices ................................................................................................................................... 32
7.1 Appendix A ............................................................................................................................ 32
7.1.1 Kinect ........................................................................................................................... 32
7.2 Appendix B ............................................................................................................................ 36
7.2.1 Arduino ........................................................................................................................ 36

iv
8 References ..................................................................................................................................... 38

List of Figures
Figure 1 Overview of the system........................................................................................................... 12
Figure 2 Joint rotation in 3D ................................................................................................................. 13
Figure 3 Use case Diagram of workout record system......................................................................... 15
Figure 4 Flow diagram of the workout record system .......................................................................... 15
Figure 5 Use case diagram of the workout monitoring system ............................................................ 16
Figure 6 Flow diagram of the workout monitoring system................................................................... 17
Figure 7 Flow diagram of the haptic device .......................................................................................... 18
Figure 8 User interface of the workout record system ......................................................................... 20
Figure 9 User interface of workout monitoring system ........................................................................ 22
Figure 10 Haptic device ......................................................................................................................... 23
Figure 11 Schematic view of the vibrator sensor .................................................................................. 23
Figure 12 User performing exercise without haptic device .................................................................. 25
Figure 13 User performing exercise with haptic device........................................................................ 26
Figure 14 Comparison of left shoulder.................................................................................................. 27
Figure 15 Comparison of right shoulder ............................................................................................... 27
Figure 16 Comparison of left elbow ...................................................................................................... 27
Figure 17 Comparison of right elbow .................................................................................................... 27
Figure 18 Comparison of left knee ........................................................................................................ 27
Figure 19 Comparison of right knee ...................................................................................................... 27
Figure 20 Comparison of left ankle ....................................................................................................... 27
Figure 21 Comparison of right ankle ..................................................................................................... 27
Figure 22 Total errors through the exercise.......................................................................................... 28
Figure 23 Kinect Sensor ......................................................................................................................... 32
Figure 24 Inside look at Kinect .............................................................................................................. 33
Figure 25 Hardware and Software Interaction with an Application ..................................................... 34
Figure 26 SDK Architecture ................................................................................................................... 34
Figure 27 Skeleton Position ................................................................................................................... 35
Figure 28 Arduino Uno Device .................................................................. Error! Bookmark not defined.
Figure 29 Arduino IDE ........................................................................................................................... 37
Figure 30 XBee Bluetooth module ........................................................................................................ 37

v
List of Tables
Table 1 Indexing of Joints ...................................................................................................................... 21
Table 2 Average variations and errors for different thresholds........................................................... 25
Table 3 Average error............................................................................................................................ 29
Table 4 Microsoft Kinect specification .................................................................................................. 33

List of Abbreviations

SDK Software development kit

Fps frames per second

I/O Input Output

vi
1 Introduction
Research shows that more physical activities every human being is involved in his daily life it
helps reducing the risk for several diseases and health conditions [1].Daily workout also helps
for better mental conditions. Physical activity is defined as body movements that requires
expenditure of energy from the body [2]. Participating in sports or performing regular
exercise routines is considered effective physical activities. World Health Organization claims
that the majority of the young population and significant amount of elderly population suffer
from obesity due to lack of physical activities [3]. Currently people are in search of methods
to do workouts at home in limited time. In most physical endeavors it is essential to have a
proper posture for effective safe training.

Modern society eagerness to have proper workout is been filled by workout DVD’s tutorials
books and many more [4]. Limited perception of body positioning has caused people to get
injured during workouts. Coaches and personal trainers can observe movements and correct
them. Personal trainer is a person is a person who use personalized approach to monitor and
motivate people to engage in exercises [5]. Their services are expensive and hard to find a
properly trained personal trainer. Research carried out by Weiss [6] suggested that lack of
understanding in workout postures, difficultness of finding good trainers and finding extra
time to visit a gym and meeting a coach has demotivated most of the beginners.

Benefit of automated real-time automated tracking and feedback system is that it can provide
guidance without any interruption to the workout. Examples for such systems are GPS
enabled running watches, cycling computers, repetition counter applications on mobile
phones and many more. Research carried out by Schwieger and Stubbs [7] elaborates that the
athletes use these workout monitoring applications to track their movements and measure the
progress of their workout. All those systems track user in outdoor environment and those
equipment’s cannot track body posture on those workout environments.

When it comes to full body tracking systems the cost is higher common people cannot afford
to buy them [8]. These systems are hard to use domestically due to its complexity and most
system requires special prepared environments. These systems also need trained people to
attach it to body and place markers. If there are no markers there need to have multiple
cameras which is hard to setup.

1
1.1 Motivation

Recent advances in low cost computer vision and tracking systems like Microsoft Kinect
offers an alternate solution to high cost automated workout tracking systems. Microsoft
Kinect devices accuracy have tested with currently using body movement tracking systems by
Khoshelham [9] and have provided reasonable accuracy for tracking joints and joint angles.
These systems ability to track user movements without the aid of wire systems is preferable
over the wired system.

Lack of understanding in workout posture have caused people to get injured during home
workout routines. Currently available workout monitoring systems provide visual and audible
feedback to the users of the system but to be aware for those commands deteriorates the users
concentration to the workout is reduced and it causes workout errors. This Master’s thesis
work aims to provide a body posture tracking and feedback system without interfering to
workout.

1.2 Objectives and Scope


This research project is carried out to reduce the gap of workout monitoring systems and the
workout personal trainers because the current workout monitoring systems lacks in providing
effective real time feedback to the users. This project aims to construct a workout monitoring
system and evaluate the effectiveness of such system in domestic usage. The system uses
Kinect device to monitor user movements and a haptic device have been used to provide
feedback to the users. Intention of using a haptic device to provide feedback is to keep more
focus of the user in workout and less focus on the posture correction through visual aids. The
system use the sensing of the user to indicate the error position of the posture. Expert
knowledge such as fitness trainers and doctors expertise ideas are encoded in to training
system and are provided through workout monitoring system. Another intention of this project
is to measure the effectiveness of wearable device to provide a tactile feedback to the user.
System uses Bluetooth wireless communication system to communicate with the haptic
device.

This project carried out in two stages

1. Construct framework and the tactile feedback system.


2. Evaluate the system incorporating an exercise.

2
Due to the current limitations in Kinect device the system uses only static standing exercises
but the framework allows further expansion in the project.

In this thesis chapter two provide related projects and researches carried out in this area. It
provides how they have use Kinect to related fields and other methods that has been used to
evaluate body postures during routines. Chapter three provide details of how the system is
designed and it followed by the implementation description in the chapter four. Chapter five
provides detailed description on how the system have been tested and their results. Chapter
six provides the conclusion and the future works of the system.

3
2 Background
Almost everyone, regardless of age, values the ability to function as independently as possible
during everyday life. Health-care consumers (patients and clients) typically seek out or are
referred for physical therapy services because of physical impairments associated with
movement disorders caused by injury during workouts, disease, or health-related conditions
that interfere with their ability to perform or pursue any number of activities that are
necessary or important to them [10]. Workout related injuries can be reduced by being aware
about the body posture during the workout.

2.1 Body Posture


Posturologists defines poor posture as an unnecessary and problematic pattern of physical
responses to postural challenges [11]. A classic example literature provide for bad posture is
sitting for hours knee tucked under a chair and that posture causes chronic knee pains. The
same principles apply when performing exercises. Poor posture causes deterioration in
musculoskeletal health [12]. There exist a misconception between postural strains and the
poor posture. Postural strains is the posture that is uncomfortable to perform such as
stretching legs to the limit. Eagerness of humans to avoid difficulties they try to avoid
postural strains even though those movement help to the improvement of the body.

Good posture is defined in the literature [13] as the posture is the position that holds the body
upright against gravity while sitting, standing or performing dynamic activities. Proper
posture allows to

 Keep the bones and joints in proper alignment.


 Decrease the abnormal wearing of joins.
 Decrease the stress on the ligaments holding the joints.
 Prevent the spine from becoming fixed in abnormal position.
 Reduce fatigue due to muscles used efficiently.

Literature suggest to keep the proper posture people need to strengthen the muscles required
to postures [14]. Kabbani suggest that performing farm rolling exercises on back glutes quads
calves chest lats will improve the muscle strengths that are essential to keeping proper body
posture. Kabbani also suggest that performing normal exercises being aware of the posture is
another way to strength muscles needed to have proper posture.

4
2.2 Related Work
Traditionally workout monitoring was carried out by the experts in that field. Expert’s
eyesight and experience was the main tool that used to assess the users body posture and
condition. The improvements in vision systems and sensors has become an aid to the trainers.
One such aid is the heart rate monitoring system for long distance runners. Research
conducted by Lambert, Mbambo and Gibson [15] have recorded heart rate through a device
attached to body and they evaluate the results after the running was over. Their research
suggest that heart rate not only provide the physical condition of the person but also it provide
the indication when to consume water during long distance running.

With the improvement of wireless technology and mobile technology heart rate monitoring
systems were adopted as remote physiological monitoring mechanism. Such systems provide
real time heart rate ECG and breathing rates of the user [16]. They have provide mobile based
patient condition monitoring system for the hospitals that they can remotely monitor the
patient’s heart condition.

Technology advances in sensors have provide researchers ability to design wearable physical
condition monitoring systems. Such research was carried out by Banos et al [17]. They
provide a wearable system that provide heart rate and breathing condition monitoring system
for sports persons and remotely monitor the performance of the athlete.

Researchers have used many mechanisms to recognise body posture using images and videos.
One such project was carried out by Goldman, Karaman and Sikora [18]. In their research
they used MPEG-7 contour based shape descriptor and the projection histogram to identify
the main body posture. In their system the recognition of posture considered as a pattern
recognition task. Their research has gained 95% accuracy to identifying the main body
posture but they suggest that they need to improve the intermediate body positioning of the
system.

Quwaider and Biswas [19] have used Hidden Markov model to identify the body posture with
wearable sensor network. They have collected relative proximity information between
wireless sensors placed on user’s body and processed that information with Hidden Markov
Model to identify user’s posture.They suggest even though this mechanism provide
mechanism to identify body posture the system needs to find a new method of measurement
other than body positioning because the system needs to change threshold from user to user.

5
Some researchers use multiple cameras setup on a special environment to identify body
postures. One such experiment was carried out by Mikic et al [20].In their research they use
four cameras to capture user’s body posture and they reconstruct 3D voxel of the users body
to identify the body posture. The initial frame is used to segment and label the body parts of
the user and user Kalman filter to construct valid articulated body model.

Ognetti et al [21] of university of Pisa have constructed a wearable kinesthetic system to


capture and classifying body postures and gestures. They have constructed a garment that
sends joint angles of the user to a computer through wired system. Figure three illustrates
their system.Their system shows promising accuracy on measuring joint angles but they had
to use wired system to preserve higher data rate for the system.

Microsoft research labs have introduced Kinect device (Project Natal) in year 2008 which
tracks human movements without attaching any peripherals to the body. This system works
by sending out infrared beams to the environment and interpreting the reflection of the beams.
They also used PrimeSence company’s encoding algorithms and the separate camera to read
the environment through visuals and track the user movements on the environment [22].
Figure for shows the internal structure of the Kinect device.

With the introduction of Microsoft Kinect there exist some projects done using commercial
software build upon using Kinect just to make people engage in workout such as Nike+Kinect
project. In this project user is interacting with virtual world through Kinect sensor via
performing exercises with the avatars in the virtual world [23]. This system uses Nike watch
to monitor user heart rate and Kinect to track the possible user movement. System makes
users to perform predefined set of exercises and provide output in a game like virtual
environment. The users are able to share their experience and the feelings in a virtually
created social network. Multiple users can participate in a single workout from the virtual
world.

When implementing such physical tracking system the distance measurement need to be
precise. This question is answered by Crock. [24] In this experiment he placed Kinect sensor
on the floor and put a card board box in measured distances and calculate the distance
provided by the sensor. The final conclusion was accuracy of the measurement decrease in a
logarithmic pattern when the distance increases.

6
Another motivational work carried out by P. Vitale. [25]In this research carried out Kinect
sensor is used to measure movement randomly selected pool of exercises and conduct the
exercises in front of a physiotherapist and after completing the movements evaluate systems
results with the physiotherapist’s results. There system was unable to replace the
physiotherapist but was able to take measurements accurately.

Another research was carried out to validate Kinect device measurement accuracy by
Mentiplay et al [26]. In their research the try to verify the Microsoft Kinect devices accuracy
on measuring foot posture in clinical environment. They have used traditional Foot posture
Index (FPI) to calculate the foot angles and compared it with the Kinect devices depth data to
evaluate foot posture. In their research Kinect device has provided moderate accuracy in the
measurement of foot postures.

Microsoft Kinect devices usability in the treatment to Parkinson disease patients was another
research area that has been discussed in medical research. One such research was carried out
by Galna et al [27] . In their research they have used computer based gaming system to train
dynamic posture control. This training is done through multi directional reaching and stepping
tasks in 12 different difficult levels. Patients performed those movements in front of Kinect
device to interact with the fully immersed virtual environment. Patients had reviewed that the
system make them feel safe. Results concludes that the use of this system have improved the
patients balance. To elaborate accuracy of the measurements of the Kinect sensor another
research was carriedout by Baena, Antonio and Lligadas [28] experiments with optical
motion capturing system.They have measured user joints angles with Optical motion
capturing system and Kinect to compare. The researches have gathered enough evidence to
suggest that Kinect as enough accuracy to use in clinical rehabilitation treatments.

The objective of the work carried out by Michael Sherman [29]was to track body poses of a
person. In that work he tracks a person who lifts a dumbbell with excess weight and free
weights. There he provides joint angles of the person and concludes that accuracy of the
Kinect sensor is enough to use in medical applications. In his research he mentioned that this
methodology can be used as a framework for exercise monitoring.

Physiotherapy exercise generator by Yeager [30] is a good example of usage of Kinect. In that
the system records movements by the physiotherapist and provided it to patients to do the
workout. There he defines an exercise description file format which records the joint positions

7
and joint names in an xml file format. When the exercise performs these files are used to track
the correctness of the user movements. After the workout was carried out the report is given
to the user .They have managed to increase the accuracy of the workout by increasing the
number of steps recorded in the system and showing it to the users.

The work carried out by Raptis, kawoskiand and Hoppe [31] shows how dance gestures can
be identified by the Kinect sensor. The system is able to identify different gestures from
classified movements in a noisy environment. They created two levels of joints for gesture
recognition methods to increase the speed of capturing data and processing. They have
omitted the details about the positions of the joints. To measure the accuracy of the dancer
expert dances movements are recorded and do the comparing of gestures and estimate the
performance of the dancer. Using this system with Kinect on a normal environment they have
managed to obtain 96% accuracy.

Another research carried out by Velloso, Bulling, Gellersen, Ugulino and Fuks [32] uses
Kinect sensor to measure the weight lifters execution of the lift and provide analysis of those
movements they have used marker less tracking(Kinect joint movements) and with devices
attached to the weight lifter. They have suggested that such measurements feedback have
positive impact to the person caring out the lifting.

In the field of biomechanics research conducted by Matthew Wham suggest that Kinect
device is an accurate portable and low cost device that can use to monitor playground related
injuries such as ankle injuries in basketball games since it can be used to capture three
dimensional data of a player’s body positioning [33].In his research he uses orthopedic knee
brace to measure the knee angle and compare it with the Kinect devices result to check the
accuracy of the system and it has provided sufficient evidence that Kinect device can be used
as a measurement tool of joint angles.

In the area of physical rehabilitation research area Kinect has been used recently. Research
conducted by Babes-Bolyai University Microsoft Kinect have been used to track user upper
limbs movement through the Kinects Video Camera and the IR Camera and have measured
the progress. This research have been improved to a system called MARI which tracks users
and aid users to improve their performances by providing instructions without aid of a
instructor at all the time [34].Another research conducted by Su [35] uses Kinect to track full
body movement with Dynamic Time Wrapping and fuzzy logic to construct a home based

8
rehabilitation system to assist the patients without the aid of a physiotherapist all the time.
Evidence suggest that the system has reduced the rehabilitation period of the patients

David et al. [36] presented a 3D avatar based physical rehabilitation system known as KRise.
There the physiotherapist communicate to the patient through virtual character and performs
exercises for him. Then the system capture the patients corresponding movement from Kinect
device and send those information to the physiotherapist. All the evaluation of the patients
movements are calculated from a centralized server. The system has been used to treat
patients remotely.

Research carried out by Ilktan and Yusuf [37] constructed a machine learning system to
identify physiotherapeutic exercises using Kinect vision system. They use Bayesian network
to recognize the exercise type by combining predefined information about the exercise. After
the exercise the system evaluate user performance using users joint movement and RGB video
and the depth data provided by the Kinect vision system. The system then counts the
repetitions user performed during the workout and evaluate the user according to
performance. They have done five different sets of experiments with their system to measure
accuracy of the exercise recognition from exercise equipment, depth data, depth data and
RGB video, comparing with predefined exercise data and using motion information. System
yields success by more and more trials.
Researchers have conducted many experiments to make physiotherapy rehabilitation more
entertaining with the help of Kinect device. These systems improves treatment by providing
motivation, greater interaction, fun and challenges.one of such experiment was conducted by
Gama et al [38]. They have investigated method to improve the entertainment factor of the
physiotherapeutic exercise by providing a game environment. They have also investigated
methods to evaluate whether the exercise performed correctly using visual feedbacks from the
Kinect device. They also tried to evaluate and measure the progress of the patient through the
system without the aid of a physiotherapist. Their research suggest that the use of fun factor to
motivate patients to engage in physiotherapeutic exercises improves the performance of those
patients.
Researchers have investigated methods to combine patients and physiotherapists distance
apart. One such experiment was carried out by Dillman [39]. In his research he uses
Onespace and Kinect to bridge the communication gap between patient and the doctor. He
uses Kinect devices depth scanning method to construct a therapeutic exercise session and
store them on Onespace. After that initial phase the patient have performed exercises in front
of Kinect camera and the system runs on Onespace overlays the physiotherapist’s movement
9
on top of the patient’s movement and provide the feeling that the physiotherapist correcting
the patient’s mistakes. That research suggest that patients prefer doctor’s all communication
methods such as verbal, demonstrative and tactile feedback.
Researchers tried to use the Kinect to transfer the knowledge of expert physiotherapists to
remote patients where they cannot access them. Such research was conducted by Cary,
Postolache and Girao [40].In their research they created a framework focusing on health
monitoring system for physiotherapy patients. In their system the 3D data is captured using
Kinect and send those data to a web based system where the expert physiotherapist can
monitor them and provide feedback in real time as well. That system allow users to perform
exercises and tasks in a virtual environment. Those tasks carefully designed by
physiotherapist to provide physiotherapeutic exercises to the patients. They have used Kinect
to reach patients in remote areas providing electronic health.
Kinect has been used to measure the movements of the elderly people.one such research was
conduct by Hassani et al [41]. Their system tries to measure the balance of the elderly people
when they are performing TUG (Timed Up and Go) movements. They have used ten young
people TUG movements as the accurate movement and measured the movements by the
elderly people’s movements. Their research findings suggest that the trunk angle can be used
to measure how much an elderly person is balanced.

Kinect base gaming systems are used to treat brain injured patients. One such research was
carried out by Simmons et al [42]. In their research they use Kinect based gaming system to
treat brain injured patients. Their aim was to provide low cost solution that can be used at
home as well as at the hospitals. The patients needed to engage in these gaming activities
provided by the system in front of Kinect device. The system tracks user movements and
measure user progress through the treatment.

Another research carried out by Andika,Tantra and Wai [43] uses Kinect based gaming
environment to make patients enthusiastic about the exercise. The system is embedded with
an assessment module which asses patient and sends feedback to the physiotherapist. In their
system they motivate patients to engage in therapeutic exercises from home to fast recovery.

2.3 Play as motivation to exercise

Play can be used to motivate people to do things they do reluctantly. That motivation comes
from the fun part of the play. That stimulation can be used to people to get engage in physical
exercises which considered as hard to motivate people to get engage.
10
Experts in fitness profession knew that the motivation plays a key role in the success of a
workout routine. Research carried out by Mclean and Pound [44] suggest that virtual reality
applications such as games can be used as a motivation to the physical rehabilitation. Game
systems have been used to treat patients with cognitive disabilities by the experts in that field
[45] .Shapi’i, Zin and Elaklouk used this gaming systems to motivate patients engage in the
activities through the game environment. They also suggest that this same mechanism can
also be applied in the other fields like physical rehabilitation and exercise.

There exist some high end systems which allow users to measure their performances costs
fortunes to the users [8]. There for these systems are not accessible to normal users. But
modern technologies such as Xbox 360 Sony PlayStation 3 Nintendo Wii console provide low
cost technologies to track human positions which provides low cost framework to create
workout guidance system. From those Xbox 360 is special because it allows tracking full
body skeletal movement s of a person. That provides functionality to measure user
movements in real time which is more accurate than manually measuring user movements
[46].

Research conducted by University of Nebraska suggest that using Microsoft Kinect, Nintendo
Wii and Play station Move in video game playing increases the oxygen consumption ,
ventilation and heart rate above the standard video game playing methods [47]. These
findings were an influence to make video game play in full body interaction. The workout
systems created with these technologies have been successfully able to engage users to
participate in exercises and provide effective workout by tracking the user postures.

The improvement in technology has aided the process of monitoring body postures. Literature
review has illustrated many solutions providing workout monitoring systems but there exist a
gap between the workout monitoring system and providing a tactile feedback to the user.

11
3 Design of solution

There are many freely available libraries that provide functionalities to access Kinect device.
Research conduct bySinthanayothin,Wongwaen,Bholsithi [48] compared the available
libraries available for the Kinect device. Their comparison suggest that the Open Kinect
library system have more functionality than other library systems but the library have many
bugs. They suggested that if developers prefer stability over functionality then use the
Microsoft Kinect SDK the official Kinect development library provided by Microsoft. This
research project uses the Microsoft Kinect SDK.
In this project Kinect device is used to capture human motions. This motions are captured in
video sequence and in skeletal sequence which provided by the Microsoft Kinect SDK. After
that system analyzes the user movements and provide feedback to the user using haptic device
constructed using Arduino Uno device. Microsoft Kinect and Arduino Uno are described
under Tools and technologies section on Appendices

This system considers standing body weight exercises due to the hardware limitations of the
Kinect vision system. The system considers Elbow, Shoulder, Knee and Ankle joints to
measure correctness of the exercise.

Figure 1 Overview of the system


12
Figure one shows the overall design of the system. As like figure elaborate the user input is
compared with the previously recorded expert data set using the system. The expert data is
captured by allowing expert user to perform exercises correctly and capturing joint angles in
frame by frame.

3.1 Calculation of joint angles

This system uses joint angles to measure the correctness of the pose rather than the body joint
positions because body position depends on the individual performing the exercise but the
joint angle is independent from the user because of that the system uses joint angle as the
measurement parameter for the system.

∆𝐚𝐧𝐠𝐥𝐞 = 𝐱 − 𝐲 ∀𝐱 ∈ 𝐞𝐱𝐩𝐞𝐫𝐭 𝐦𝐨𝐯𝐞𝐦𝐞𝐧𝐭 𝐣𝐨𝐢𝐧𝐭 𝐚𝐧𝐠𝐥𝐞𝐬 |∀𝐲


∈ 𝐔𝐬𝐞𝐫 𝐦𝐨𝐯𝐞𝐦𝐞𝐧𝐭 𝐉𝐨𝐢𝐧𝐭 𝐚𝐧𝐠𝐥𝐞𝐬

Equation 1 Check the difference of Joints with the original movement

Kinect SDK allows to calculate joint angles relative to the parent joint in quaternion format

Figure 2 Joint rotation in 3D


13
The quaternion representing the rotation of angle is of the form (w,x,y,z), where W represents
the magnitude of the rotation, around the axis defined by vector (x,y,z). Equation one above
shows the relationship between W and angle in degrees. [49]

Quaternion q is represented as summation of four numbers

𝒒= 𝒘+𝒙×𝒊+𝒚×𝒋+𝒛×𝒌 ∀𝒘, 𝒙, 𝒚, 𝒛 ∈ 𝑹
Equation 2 Quaternion equation

From that the theory of Quaternion implies that if rotates through α radians about a unit vector
(x1,y1,z1) then the rotation can be represented by the fallowing quaternion

𝜶 𝜶 𝜶 𝜶
𝒒 = 𝐜𝐨𝐬 ( ) + (𝒙𝟏 ∗ 𝐬𝐢𝐧 ( )) + (𝒚𝟏 ∗ 𝐬𝐢𝐧 ( )) + (𝒛𝟏 ∗ 𝐬𝐢𝐧( ))
𝟐 𝟐 𝟐 𝟐

Equation 3 Represent Quaternion usin rotation angle

From theory of Quaternion

𝜶
W=𝐜𝐨𝐬 (𝟐)

𝟏𝟖𝟎
𝚯=( ) × 𝟐 × 𝐜𝐨𝐬 −𝟏 𝐰
𝛑

Equation 4 Calculate the joint angle

Microsoft Kinect SDK uses quaternion representation to indicate the joint location of the
tracked person.

3.2 Workout Record System

Workout recording system is been used to record expert user movement prior to the use of
workout monitoring system. The system captures user movements in an indexed image
sequence and synchronously record the key joint angles relevant to the frame with the same
indexing as the image captured.

14
Figure 3 Use case Diagram of workout record system

Figure eight illustrate the use case diagram of the workout record system. This component of
the system uses Kinect Audio video and depth stream capabilities.

Figure 4 Flow diagram of the workout record system

Figure illustrates the flow diagram of the workout record system. This component splits
received data stream in to Video, depth data and skeletal streams. System uses video stream to
capture the user movements. Depth data is used to calculate joint angles and draw skeleton on
the user interface. Audio stream of Kinect is used to provide commands to the system such as
“START” and “STOP” to start and stop workout recording.

15
3.3 Workout monitoring system

Workout monitoring system is the main component of this system. It is been used to monitor
the workout of the user and provide decision of the users performance.

Figure 5 Use case diagram of the workout monitoring system

Figure eight illustrates the Use case diagram of the workout monitoring system. User
postures are captured by the Kinect device and send video depth and audio streams to the
Microsoft Kinect SDK. Kinect SDK split the data streams and construct Video Skeletal Audio
and depth streams. Current system uses skeletal stream and audio stream to workout
monitoring system. User movements are drown on a separate screen in skeletal format. The
intention of having such display is to make aware about the body positioning of the user.
Audio stream of Kinect is used to provide commands to the system such as “START” and
“STOP” allowing user to communicate with the system to start and stop monitoring of the
workout. Feedback system uses Bluetooth version 3.0 to communicate with the haptic device
due to the hardware limitations of the haptic device. Current system uses the Bluetooth
capabilities of a personal computer using external Bluetooth module or using inbuilt
functionalities of Bluetooth.

16
Figure 6 Flow diagram of the workout monitoring system

Figure nine shows the block diagram of the workout monitoring system. Previously recorded
image stream of an expert user using workout recording system is loaded as workout video in
the display. Workout stream also loads joint angles synchronously with the image stream.
Those joint data and current users joint data compared to make the decision whether the user
performs accurately and according to the decision relevant feedback is sent to the haptic
device. Current system also record the current user’s variance from the expert user’s
movement.

3.4 Haptic Device


Most of the therapeutic exercises [39] suggested that the patients prefer tactile feedback when
they are performing the workout. This system comprises of a haptic device to provide
feedback. Haptic technology is a technology which recreate the sense of touch by applying
force, vibration or motion to the user [50]. This system use the vibration to provide feedback
to the user where the error occurs. Workout monitoring system employs Bluetooth technology
to communicate with the haptic device and Arduino technology to construct the haptic device.

Arduino device needs a Bluetooth module to enable Bluetooth communication. Current haptic
device uses Xbee zigbee communication module. These modules uses IEEE 802.15.4
networking protocol for fast peer-to-peer networking [51].

17
Figure 7 Flow diagram of the haptic device

Arduino requires 9V continues power supply. The system is incorporated with four 9v
batteries paralleled to power the haptic device for longer period. Vibrator sensors are also
powered with the same power source.

18
4 Implementation

The desktop application is developed in c# language using Visual studio 2012, Dot Net
Framework 4.0 and Microsoft Kinect SDK 1.8 version. Microsoft Visual studio provides
stable integration with the Microsoft Kinect SDK. Wearable Haptic device uses C
programming language because Arduino works with C. System consists of three parts:
Workout Record System, Workout Monitoring System, and Haptic Device. These parts are
described separately below.

4.1 Workout Record System

Workout recording system uses Kinect devices video stream audio stream and depth data
stream. Video camera of the Kinect device is been used to capture video streams of the user
interaction. When a user performs exercise in front of Kinect device the system use the video
stream to captures user in still images sequence indexing with frame number. System uses
640*480 screen resolution for the image to keep the Kinect frame rate to 30 fps and to
preserve space required for the system. User interface provides viewport to visualize current
exercise performing using skeletons. Kinect depth data stream is used to construct the skeletal
frame of the user and system uses the skeletal frame to calculate joint angles. Elbow,
Shoulder, Knee and Ankle joint angles are calculated and recorded along with the frame
number and stored in a separate file.

This module uses Kinects voice recognizing system to start and stop the recording. It listens
to the commands “START” and “STOP” commands to start and stop the recording the
workout. Speech recognition library used by the system is the speech library is the Microsoft
Speech library that ships with Microsoft Kinect SDK. Grammar to understand speech is
hardcoded to the system because it only needed to understand two words rather than having it
on a separate xml document. Speech recognition event handler provided by the Microsoft
Kinect SDK is used to call the events required. The system is trained to understand the basic
words comes with game play like “START” and “STOP”. Researchers suggest that use of
confidence level of 75% is more suitable for application development because accent of the
people varies from person to person [52].

19
Figure 8 User interface of the workout record system

Figure 12 illustrates the user interface of Workout recording system. Skeletal movements are
displayed alongside video display in a separate viewport. User can monitor his own moves
while been recorded.

4.2 Workout Monitoring System

Workout monitoring system is the core component and it uses Kinect Devices depth data
stream to get users Joint angles. Interface provides viewport to visualize user’s skeletal
movements also interface provide viewport to visualize previously recorded expert user’s
movements. System uses Bluetooth communication technology to communicate with the
haptic device.

The system is built to use by a single person because of that the system added audio
recognize system of Kinect to activate play and stop functionality of the interface by voice
commands. Same as the Workout record system users can use “START” and “STOP”
commands to start and stop the workout monitoring system. System uses Image sequence to
view the recorded workout of an expert user.

20
System interface also allow users to check whether the Bluetooth of the PC is available or not.
32feet C# library has been used to enable communication with the haptic device. Pairing of
Bluetooth device to the personal computer has to done manually. The identifier code of the
haptic device is hardcoded to the system .This has done to enable system’s communication
only with the haptic device and to reduce other Bluetooth communication interferences. In the
user interface Bluetooth icon is gray then it suggest that devices Bluetooth is disabled if the
Bluetooth available then the Bluetooth icon will be colored in blue using the provided
functionalities of the 32feet library.

System uses image sequence to visualize the expert user movements. The system synchronize
the images and the joint angle records using the frame number. This also allows the system to
be us with a different frame rates. With this approach the same workout recording can be
changed in to a different repetition speed suit to the person performing the exercise.

The workout monitoring system calculates joint angles frame by frame. Joints are indexed
from one to eight. Table two shows all the measured joints and indexes that used to track
them

1 Left Shoulder
2 Right Shoulder
3 Left Elbow
4 Right Elbow
5 Left Knee
6 Right Knee
7 Left Ankle
8 Right Ankle
Table 1 Indexing of Joints

The system calculates each joint difference to the expert users’ movement. If the difference of
joint angles differ more than a threshold value then the system evaluate that joint angle is
invalid. The system always communicate with the haptic device by sending a byte array. This
array contains eight elements. Each element represents a measured joint location. If there is an
error on that joint the system puts one to that element if not it puts zero to that element.

21
Figure 9 User interface of workout monitoring system

Figure 13 illustrates the user interface of the Workout monitoring system. Recorded exert user
movements are displayed on the left screen and the skeletal display of the current user
performing exercise is displayed on right screen. Skeletal screen is used to allow the users to
understand the current body posture of the user and to correct them

4.3 Haptic Device

Haptic Device is constructed combining Arduino Uno device, XBEE Bluetooth module and
vibrators. Haptic device uses vibration to indicate users that the vibrated locations joint have
inaccurate angle with respect to the expert’s movement.

Arduino device is a single board microcontroller that is well tested in field of electronics. It
consist of Atmel ARM processor with 14 digital I/O pins. Detailed description of Arduino is
provided at the Appendix B

22
Figure 10 Haptic device

Arduino program is written in C programming language. Prior to the use the system the
Bluetooth device is paired with the pc to enable Bluetooth communication.

Figure 11 Schematic view of the vibrator sensor

Figure 16 illustrate the haptic device’s vibration systems schematic view. When an error
occurring signal received by the Arduino it identifies the proper vibration sensor and sends a
23
current pulse. When the vibrator receives the pulse from Arduino it completes the circuit and
device begins to vibrate. Vibration sense of the module is provide using a mobile phone
vibrator attached to the circuit.

The workout monitoring system always communicate with the haptic device through
Bluetooth technology. Haptic device receive a byte array of eight elements and each element
represent a joint been monitored. If all the elements on the array is zero it indicates that there
are no errors in the joints and Arduino writes value zero to each pin. If one or more elements
have the value of one it indicate those joints have some errors. When such message arrives the
Arduino identifies the pin that required to be active and it writes the value one to that pin.
That value generates an electronic pulse and it makes the transistor of the relevant vibrator
circuit to forward baized. Then the circuit completers and the relevant vibrator vibrates
providing user the feedback.

24
5 Evaluation
The procedure for the evaluation of the application is to compare the user movement with an
expert user such as physiotherapist using body angles. Prior to the evaluation process workout
is recorded using workout record system of the application in a sequence of images and record
body angles relevant to the image on a text document. The system was tested with different
threshold values prior to the experiments begin threshold values

Threshold Value Average Errors Average deviation


of knee
5 5.57 -0.952
10 3.524 1.1339
Table 2 Average variations and errors for different thresholds

Physiotherapist suggest to keep the threshold value to ten allowing users to have some
freedom of movement from original value in a safe range.

5.1 Experimental setup


The judgement of an error occurrence is considered using the threshold value. Prior to the
experiments the threshold value is hardcoded to the system.

Figure 22 User performing exercise without haptic


device

25
Figure 33 User performing exercise
with haptic device

All the participants were undergraduate university students and they were all had good
understanding about performing the exercise that has been used for testing purposes of the
system.
Testing process carried out by first letting users to perform exercise without wearing the
haptic device and recorded their movement error s at each frame. In this phase of the testing
their guidance was the visual guidance of previously recorded image stream and the users
skeletal view diagram. The next phase of the testing process was to allow users to wear the
haptic device and perform the same exercise. In that phase also user’s error records are kept
on a separate file.

5.2 Results
Throughout the experiments the user deviation from the original expert user movement at
each joint is recoded from frame by frame without wearing the haptic device. Also the same
process carried out wearing haptic device. To evaluate the effectiveness of this system the
variance at each joint is plotted for each joint with and without of the haptic device.

26
Left Shoulder Right Shoulder
200
200

100 0

715
1
103
205
307
409
511
613

817
919
1021
1123
1225
1327
1429
0
-200

1021
1
103
205
307
409
511
613
715
817
919

1123
1225
1327
1429
-100
Without Body Kit With Body Kit
Without Body Kit With Body Kit

Figure 15 Comparison of right shoulder


Figure 44 Comparison of left shoulder

Left Elbow Right Elbow


150
100 100
50 50

0 0
207
1
104

310
413
516
619
722
825
928
1031
1134
1237
1340
1443

409
1
103
205
307

511
613
715
817
919
1021
1123
1225
1327
1429
-50 -50

-100 -100

Without Body Kit With Body Kit Without Body Kit With Body Kit

Figure 16 Comparison of left elbow Figure 17 Comparison of right elbow

Left Knee Right Knee


80
60 100
40
20 50
0
0
1
97
193
289
385
481
577
673
769
865
961
1057
1153
1249
1345
1441

-20
919
1
103
205
307
409
511
613
715
817

1021
1123
1225
1327
-40 -50 1429
-60
-80 -100

Without Body Kit With Body Kit Without Body Kit With Body Kit

Figure 18 Comparison of left knee Figure 19 Comparison of right knee

Left Ankle Right Ankle


200
200
100
100
0
0
1
91
181
271
361
451
541
631
721
811
901
991
1081
1171
1261
1351
1441

715
1
103
205
307
409
511
613

817
919
1021
1123
1225
1327
1429

-100 -100

Without Body Kit With Body Kit Without Body Kit With Body Kit

Figure20 Comparison of left ankle Figure 21 Comparison of right ankle


27
Figure 19 to Figure 25 shows the comparison of deviations of the movements by the user with
and without the haptic device. Blue colored paths are without the haptic device only with the
aid of the video and the red colored paths with the haptic device and the video aid.
Left shoulders variance from the expert users movement with and without the haptic device
same for that user. Right shoulder also provide the same result for that user but towards the
end of the workout record the variance of both shoulders from the expert user movement has
decreased wearing haptic device. Left and right elbows also provide the same solution as like
shoulders towards the end of the experiment session the variance from expert users movement
wearing haptic device is reduces
Left and right knee provide the same results without the haptic device as well as with the
haptic device. Results from both ankles provide unrealistic variances from the original
movements suggesting that most of the ankle values are noisy values.
The effect of the light condition of the environment was a considerable factor in the accuracy
of the system. Ankle reign have less light relative to the other parts of the body since most of
the light sources are above the human height. Shadows of the environment and the body
disturbed the Kinect devices depth data capturing and that produce the inaccurate results.

5.3 Observation
The results have shown that the use of workout monitoring system with the haptic device have
reduced the average number of errors occurred for a frame.

Total Error
9
8
7
6
5
4
3
2
1
0
868

1225
1
52
103
154
205
256
307
358
409
460
511
562
613
664
715
766
817

919
970
1021
1072
1123
1174

1276
1327
1378
1429
1480

Without Body Kit With body Kit

Figure 22 Total errors through the exercise

Figure illustrates the comparison of the total errors for a frame while experiment session
without wearing the haptic device as well as with wearing the haptic device.

28
mean Left Right Left Right Left Right Left Right Total
Differen Shoulder Shoulder Elbow Elbow Knee Knee Ankle Ankle errors
ce
Without -9.43433 -1.90461 10.8833 0.74304 -2.34617 -8.9607 4.38924 12.2081 4.79738
Body Kit
With 7.74544 4.45179 -0.91426 1.00495 1.13398 0.26414 -4.27752 -19.2229 3.52426
Body Kit
Table 3 Average error

Table shows that use of the haptic device with the workout monitoring system have reduced
the variance from the original movement as well as the average number of errors occurred
during the experiment session for a single person.

Experiment has been carried out for five users and calculate the joint angle variations and the
total errors for the each frame. To measure the significance of the project mean value of errors
occurred per frame during workout using the body kit and without using the body kit was
calculated using t value

User Index Mean error without body kit Mean error with body kit
1 5.571584 5.525108

2 6.154762 5.794181

3 6.300326 5.383696

4 5.90194 5.564885

5 6.298813 5.003337

X1=Mean of first trial

𝑥1 − 𝑥2 X2=Mean of second trial


𝑡=
2 2
√(𝑠1 + 𝑠2 )
S1=Standard deviation of first trial
𝑛1 𝑛2
S2=Standard deviation of second
trial
Equation 5 T value equation
n1,n2=Total Number of participants

Calculated t value= 2.6227


29
Degrees of freedom= 4

Standard error of difference = 0.225

Two tailed p value= 0.0586

By conventional criteria, this difference is considered to be not quite statistically significant.

Statistical analysis suggest that the use of haptic device does not provide a significant
improvement using it without the use of haptic device while performing the workout.

30
6 Conclusion & Future Work

6.1 Conclusion

This effort has been carried out to find an effective method to monitor workout sessions. The
motivation to this work was to reduce workout related injuries. Literature review suggested
that there is a gap in relaying information to the practitioner regarding the errors occurred
during the workout in real time. This project combines Microsoft Kinect technology with the
Arduino technology to construct a complete workout monitoring system and a wearable
haptic device to provide feedback in real time. Evaluation of the system was carried out
comparing previously captured physiotherapist movements with the practitioners performing
the same movements with and without the haptic device. The results suggest there is no
significant improvement with the use of workout monitoring system with the haptic device
attached to the practitioner.

6.2 Future works

Further improvements can be broken in to three categories of Data Acquisition, Decision and
Feedback. Current systems data acquisition uses Kinect Xbox 360 version. This systems
adjusting to the environmental light condition is limited when compared with the newer
version of Kinect. This system only uses single Kinect device to acquire data but accuracy of
the system can be improved using multiple Kinect devices simultaneously. Current system
uses Kinect skeletal stream to acquire joint angle this could be improved using multiple
Kinect devices and constructing real time 3d models to improve the accuracy of the system.

Current system uses only the expert users recorded joint angles this could be improved using
joint angles as well as the relative position of the joints with respect to the skeletal view can
be incorporate with the system. Another improvement to the system would be to add physical
monitoring system to the system which could monitor user condition and according to the
users physical condition change the exercise or change the speed of the exercise.

Current feedback system is using wearable haptic device but this can be improved using
designing wearable dress for the feedback system. Another improvement would be to create a
more entertaining interactive environment such as a game to do workout.

31
7 Appendices

7.1 Appendix A

7.1.1 Kinect
Kinect is a motion sensing device by Microsoft. It is created from a project called Project
Natal. This is originally developed for Xbox360.This device can capture motions of the
human body which allows players to control the avatars in the virtual world through their
body movements. This device also supports to capture sound from the environment through
its array of microphones. This is called Natural user interface (NUI) system.

Figure 23 Kinect Sensor

7.1.1.1 Components of Kinect Sensor


 Color Camera:- This is used to capture the video stream of the user interactions.
 Infrared(IR) Emitter:- Emits infrared light in a pseudo-random dots pattern over
everything in front of it
 IR Depth Sensor :- Sensor is used to capture the depth data from the IR emits.
 Tilt Motor:- Tilt motor is used tilt the sensor.
 Microphone Array:- Microphone array is used to capture audio.
 LED:- Indicate power supply and connection status.

32
Figure 24 Inside look at Kinect

Kinect Array Specification


Viewing angle 43° vertical by 57° horizontal field of view

Vertical tilt range ±27°

Frame rate (depth and color stream) 30 frames per second (FPS)

Audio format 16-kHz, 24-bit mono pulse code modulation

(PCM)

Audio input characteristics A four-microphone array with 24-bit analog-to-

digital converter (ADC) and Kinect-resident

signal processing including acoustic echo

cancellation and noise suppression

Accelerometer characteristics A 2G/4G/8G accelerometer configured for the

2G range, with a 1° accuracy upper limit.


Table 4 Microsoft Kinect specification

33
7.1.1.2 Kinect Driver and SDK

Official documentation of the Kinect SDK provide architectural overview of the SDK in the
section of Programming guide section.
Figure x shows the interaction of the Kinect Device Kinect software library and the user
application.NUI Library is a part of the library allows application developers to use tools and
API s providing real time tracking of movements.

Figure 25 Hardware and Software Interaction with an Application

Figure 29 provide more detail architecture of a application using Kinect SDK

Figure 26 SDK Architecture

Kinect device can be connected to pc through USB connector. But the limitation of the USB
connection is limitation of the band width of video transfer. Because of that frames are
compressed and preserve the frame rate to 30fps. API provides two methods to extract
information from frames one is polling method and other is event method.

34
This project uses more functionalities of the Kinect NUI skeletal tracking system provided by
the SDK. Kinect can track 6 skeletons simultaneously but two persons can be tracked in full
detail. Other skeletons only have basic information such as overall position and rotation.
When person discovers a person it generates a skeleton class for a person. This class contains
information about joint positions and tracking. Each skeleton can have at most 20 joints at a
time (as shown in figure x).For each joint point contains information of joint positioning of
the space in x,y,z values.

Figure 27 Skeleton Position

There are two coordinate systems in Kinect SDK one is depth unit measurements where
coordinate values are given in pixel values and other method is space coordinate
System(skeletal space) where the coordinates are given in meters.
Official Kinect documentation provides using depth stream Kinect can measure up to
millimeter level accuracy. Where the Depth data stream buffer contains depth 13 bits to get
the distance value.

35
7.2 Appendix B

7.2.1 Arduino

The Arduino micro controller is an open source programmable tool to create interactive work.
Micro controller consist of microchip on a circuit board with read write capabilities, memory,
input and output. The Arduino micro controller adapt these qualities as well.

Figure 28 Arduino Uno Device

Figure 28 shows the Arduino Uno device.Arduino board consist of Atmel 8-bit
AVR microcontroller with complementary components that facilitate programming and
incorporation into other circuits. Some shields communicate with Arduino board directly with
connecting pins and through serial bus. These shields can stack one upon another to work
parallel.

36
Arduino also provide an IDE to write code and upload the code. Arduino can be connect to
the computer through a USB cable.

Figure 29 Arduino IDE

Figure 29 shows the user interface of Arduino IDE. Its programs can be written in C or C++
languages. Arduino IDE provide an interface to monitor serial output through a terminal.

Arduino uses Xbee Bluetooth module to enable Bluetooth communication to Arduino device

Figure 30 XBee Bluetooth module

Figure 30 shows a diagram of XBee Bluetooth module uses with Arduino device.Xbee
module pairs with the relevant party and start communicating and Arduino can access
communicated data as serial reads.

37
8 References

[1] "Health Benefits of Physical Activity," Coca Cola, 2013. [Online]. Available:
http://www.beverageinstitute.org/article/health-benefits-of-physical-activity/. [Accessed
2014].

[2] "Physical activity," WHO, 2014. [Online]. Available:


http://www.who.int/topics/physical_activity/en/. [Accessed 2014].

[3] "Physical Inactivity: A Global Public Health Problem," WHO, [Online]. Available:
http://www.who.int/dietphysicalactivity/factsheet_inactivity/en/. [Accessed 27 October 2014].

[4] R. Cleland, Weight-loss advertising an analysis of current trends, DIANE Publishing, 2002.

[5] "NSCA Certified Personal Trainer," National Strength and Conditioning Association, 2014.
[Online]. Available: http://www.nsca.com/NSCA-CPT_Certification_2/. [Accessed 2014].

[6] M. Weiss, Motivating Kids in physical activities, bloomington: President's council on physical
fitness and sports, 2000.

[7] . K. Schwieger and J. Stubbs, "Exercise monitoring system and methods," PARAGON SOLUTION,
18 May 2004. [Online]. Available: http://www.google.com/patents/US6736759. [Accessed 27
October 2014].

[8] W. A. Sands, Assisting Olympic Weightlifting via Motion Tracking at the, Vermont, 2008.

[9] K. Khoshelham, "Accuracy analysis of kinect depth data," in ISPRS Calgary 2011, Calgary, 2011.

[10] C. KISNER and L. A. COLBY, Therapeutic Exercise Foundations and Techniques, Philadelphia: F.
A. Davis Company, 2007.

[11] P. Ingraham, "Spinal Nerve Roots Do Not Hook Up to Organs!," Pain science, 2013. [Online].
Available: https://www.painscience.com/articles/spinal-nerves-and-organs.php. [Accessed
December 2014].

[12] P. Ingraham, "Does Posture Correction Matter?," Pain Science, 2013. [Online]. Available:
https://www.painscience.com/articles/posture.php#sec_what. [Accessed December 2014].

[13] J. Johnson, "What is posture?," human kinetics, [Online]. Available:


http://www.humankinetics.com/excerpts/excerpts/what-is-posture. [Accessed December
2014].

[14] M. Kabbani, "How to have a straight back: your guide to good posture," SwolePT, [Online].
Available: http://www.swolept.com/posts/how-to-have-a-straight-back-your-guide-to-good-
posture#.VJ_La14AA. [Accessed December 2014].

38
[15] M. Lambert, Z. Mbambo and C. Gibson, "Heart rate during training and competition for
longdistance running," Journal of Sports Sciences, vol. 16, pp. 85-90, 1998.

[16] S. Drawer, Real time ‘physiological’ monitoring, 2006.

[17] O. Banos, C. Villalonga, M. Damas, P. Gloeskoetter, H. Pomares and I. Rojas, "PhysioDroid:


Combining Wearable Health Sensors and Mobile Devices for a Ubiquitous, Continuous, and
Personal Monitoring," The Scientific World Journal, vol. 2014, p. 11, 2014.

[18] L. Goldman, M. Karaman and T. Sikora, Human Body Posture Recongition using MPEG-7
Descriptors, Berlin, 2004.

[19] M. Quwaider and S. Biswas, Body posture Identification using Hidden Markov Model with a
wearable Sensor Vetwork, East Lansing, 2008.

[20] I. Mikić, M. Trivedi, E. Hunter and P. Cosman, Articulated Body Posture Estimation from Multi-
Camera Voxel Data, San Diego,, 2001.

[21] A. ognetti, F. Lorussi, M. Tesconi, R. Bartalesi, G. Zupone and D. D. Rossi, "Wearable kinesthetic
systems for capturing and classifying body posture and gesture," in Engineering in Medicine and
Biology 27th Annual Conference, Shanghai, 2005.

[22] M. ROSOFF , "The Story Behind Kinect, Microsoft's Newest Billion Dollar Business," Busuness
Insider, 19 Januay 2011. [Online]. Available: http://www.businessinsider.com/the-story-behind-
microsofts-hot-selling-kinect-2011-1?op=1. [Accessed 18 July 2014].

[23] 2014. [Online]. Available: http://www.wpcentral.com/nike-kinect-training-review.

[24] N. Crock, 3 2011. [Online]. Available: http://mathnathan.com/2011/02/depthvsdistance/.

[25] P. Vitale, "EVALUATION AND MEASUREMENTS OF KINECT MOVEMENT DETECTION IN PHYSICAL


THERAPY," 2012.

[26] B. Mentiplay, R. Clark, A. Mullins, A. Bryant, S. Bartold and K. Paterson, "Reliability and validity
of the Microsoft Kinect for," Journal of Foot and Ankle Research, 2013.

[27] B. Galna, D. Jackson, G. Schofield, R. McNaney, M. Webster, G. Barry and D. Mhiripiri,


"Retraining function in people with Parkinson’s," Journal of NeuroEngineering and
Rehabilitation, 2014.

[28] A. F. Baena, A. Sus´ın and X. Lligadas, "Biomechanical Validation of Upper-body and Lower-body
Joint Movements of Kinect Motion Capture Data," Intelligent Networking and Collaborative
Systems (INCoS), pp. 655-661, 09 2012.

[29] M. Sherman, "Body Pose Tracking and Instrumented Personal Training using Kinect," 2013.

[30] R. Yeager, "An Automated Physiotherapy Exercise Generator," 2013.

39
[31] M. Raptis, D. Kirovski and H. Hoppe, "Real-Time Classification of Dance Gestures from Skeleton
Animation," Eurographics/ ACM SIGGRAPH Symposium on Computer Animation, 2011.

[32] E. Velloso, A. Bulling, H. Gellersen, W. Ugulino and H. Fuks, "Qualitative Activity Recognition of
Weight Lifting Exercises," in Augmented Human '13, Stuttgart,Germany, 2013.

[33] R. M. Wham, Three-Dimensional Kinematic Analysis Using the Xbox Kinect, Tennessee, 2012.

[34] A. C˘ALIN, A. CANTEA, A. DASC˘ALU, C. MIHAIU and D. SUCIU, MIRA {UPPER LIMB
REHABILITATION SYSTEM USING, 2011.

[35] C.-J. Su, "Personal Rehabilitation Exercise Assistant with Kinect and," International Journal of
Information and Education Technology,, vol. 3, 2013.

[36] D. Antón, A. Goñi, A. llarramendi, J. J. Torres-Unda and J. Seco, "KiReS: A Kinect-based


telerehabilitation system," in HealthCom2013, Lisbon, 2013.

[37] A. Ilktan and A. S. Yusuf, A Computerized Recognition System for the, 2012.

[38] A. d. Gama, T. Chaves, L. Figueiredo, C. Araújo, V. Teichrieb, M. Carneiro, D. Marques-Oliveira,


A. Baltar, A. Cardoso and K. Monte-Silva, Ikapp – A Rehabilitation Support System using Kinect,
Recife, 2012.

[39] c. Dillman, Exploring Physiotherapy with OneSpace, Calgary, 2012.

[40] F. Cary, O. Postolache and P. S. Gir˜ao, "Kinect Based System and Serious Game Motivating," in
International Conference on Sensing Technology, liverpool, 2014.

[41] A. Hassani, A. Kubicki, V. Brost and F. Yang, Real-Time 3D TUG Test Movement Analysis for,
Dijon, 2014.

[42] S. Simmons, R. McCrindle, M. Sperrin and A. Smith, Prescription Software for Recovery and
Rehabilitation Using Microsoft Kinect, Reading, 2013.

[43] B. Andika, J. Tantra and A. A. P. Wai, Interactive Rehabilitation Game Development Using
Natural User Interface Devices, Singapore, 2012.

[44] N. Maclean and P. Pound, "A critical review of the concept of patient motivation in the
literature on physical rehabilitation," Social Science & Medicine, pp. 495-506, 2000.

[45] A. Shapi’i, N. A. M. Zin and A. M. Elaklouk, A Game System for Cognitive Rehabilitation,
Selangor: Hindawi Publishing Corporation, 2014.

[46] Naofumi KITSUNEZAKI, Eijiro ADACHI, Takashi MASUDA, Jun-ichi MIZUSAWA, "KINECT
applications for the physical rehabilitation," in Medical Measurements and Applications
Proceedings (MeMeA), Gatineau, QC, 2013.

40
[47] KRISTA S.,GREGORY A,SARAH M., Wii, Kinect, and Move. Heart Rate, Oxygen Consumption,
Energy, Kearney, 2014.

[48] C. Sinthanayothin, N. Wongwaen and W. Bholsithi, "Skeleton Tracking using Kinect Sensor &
Displaying in 3D Virtual Scene," International Journal of Advancements in Computing
Technology, vol. 4, pp. 213-223, 2012.

[49] L. Vicci, Quaternions and Rotations in 3-Space: The Algebra and its Geometric Interpretation,
Chapel Hill : University of North Carolina , 2001.

[50] Robles-De-La-Torre, Virtual Reality Touch/Haptic, Thousand Oaks, 2009.

[51] "Xbee," Digi, 2014. [Online]. Available: http://www.digi.com/xbee/.

[52] L. Holmquest, "Listening with Kinect," MSDN Magazine, December 2012. [Online]. Available:
http://msdn.microsoft.com/en-us/magazine/jj884371.aspx. [Accessed 12 December 2014].

[53] A. Jana, Kinect for Windows SDK Programming Guide, 2 ed., B. D'Mello, I. Morbiwala, A. Nair
and A. Paiva, Eds., Birmingham: Packt Publishing, 2012.

[54] Microsoft, 2014. [Online]. Available: http://msdn.microsoft.com/en-us/library/jj131025.aspx.

[55] K. Khoshelham and S. O. Elberink, "Accuracy and Resolution of Kinect Depth Data for Indoor
Mapping Applications," Sensors , p. 1437–1454, 02 2012.

[56] "Health Benefits of Physical Activity," 2013. [Online]. Available:


http://www.beverageinstitute.org/article/health-benefits-of-physical-activity/.

41

You might also like