8
A Markeless Augmented Reality Tracking for Enhancing the User Interaction during Virtual Rehabilitation Alexandre Klein Instituto de Informática UFRGS Porto Alegre, Brazil [email protected] Gilda Aparecida de Assis Departamento de Informática UTFPR Pato Branco, Brazil [email protected] AbstractVirtual Rehabilitation provides a range of technological and clinical developments in the field of virtual reality and augmented reality applied to rehabilitation. In this context, a system for upper-limb motor rehabilitation of stroke patients based on augmented reality was developed. This system aimed providing the motor imagery using a virtual three-dimensional arm that replaces the paralyzed arm in a real-time image of the patient. During the task execution in the augmented reality environment, the physiotherapist had guided the patients while they saw themselves and surroundings, as in a mirror. Although not achieving statistical significance, the Fugl-Meyer results of these case studies suggested that the participants were able to use the technology and they had larger shoulder range of motion of the affected hand post-training using the augmented reality system. However, many faults in the detection and recognition of physical markers were occurred whenever there was partial obfuscation or imperfect capture of the marker’s image. For this reason, a new version of the system was developed to provide an augmented reality system without markers, and thus, aiming to improve the usability of next clinical trials. Keywords: Augmented reality; virtual rehabilitation; markless tracking I. INTRODUCTION The stroke is a worldwide leading cause of disability, which affects men, women and even children, with higher incidence in the elderly [1]. It produces motor, sensory and cognitive impairments as well as a decreased ability to withstand efforts [2]. Upper-limb hemiparesis is one of the most debilitating effects of a stroke and is the most common impairment underlying functional disability [3]. Post-stroke rehabilitation has focused on reducing motor impairment and minimizing physical disability through the functional reorganization of the brain, when not affected brain cortical areas assume the functions of the damaged brain regions [4]. Many of newer post-stroke rehabilitation treatments take advantage of technological advances such as the improvement in robotic design, the development of haptic interfaces, and the advent of human-machine interactions in virtual reality. These technologies are being investigated in an attempt to develop more effective strategies to reduce the physical disabilities resulting from stroke damage [5]. Virtual Reality (VR) technology has emerged as a potential method in the field of rehabilitation with advantages, such as a controllable environment, salient feedbacks, the sense of presence, entertaining treatments and digital records in the VR rehabilitation systems [6]. However, when immersed in a VR environment, the patients cannot see their hands and have to position the hand relative to the virtual environment. The movements of the hands and the interactions with the virtual objects are in separate independent coordinate references, and this would affect the effectiveness of these rehabilitation systems [7]. Augmented Reality (AR) technology is capable of addressing these challenges by superimposing virtual objects onto the physical world, in which the users can interact with virtual and real objects using their hands directly. Compared with VR systems, AR-based rehabilitation systems could provide a better realism feeling to the patients during the exercising process, while retaining the advantages of the VR systems applied to rehabilitation. In the AR environment, the virtual objects and the hands of the patients are in the same physical space and the patients can visualize the real environment around them [8]. A clinical protocol using an interactive workbench called virtual reality mirror (VR-Mirror) and combining physical and mental practice for post-stroke rehabilitation was proposed in [9]. It used virtual reality technology to provide patients with auditory and visual cues to direct their attention to the dynamic structure of a movement, thus contributing to the generation of the motor imagery. The results of applying the VR-Mirror protocol to a group of nine post-stroke patients with chronic motor impairment of the upper limb suggested that five of the nine hemiplegic patients showed a reduction in disability, measured by the Fugl-Meyer scale and Action Research Arm test, without loss of motor gains after discharge. The authors concluded that these results encourage further investigations on the role of the computer- guided mental practice in the upper limb rehabilitation [10]. Another work trained the shoulder/arm motor control and grasp strength of chronic stage post-stroke patients using a large display and a PC running custom virtual reality games. The results of this study indicated that the participants were 2013 XV Symposium on Virtual and Augmented Reality 978-0-7695-5001-5/13 $26.00 © 2013 IEEE DOI 10.1109/SVR.2013.43 117

[IEEE 2013 XV Symposium on Virtual and Augmented Reality (SVR) - Cuiabá - Mato Grosso, Brazil (2013.05.28-2013.05.31)] 2013 XV Symposium on Virtual and Augmented Reality - A Markeless

Embed Size (px)

Citation preview

Page 1: [IEEE 2013 XV Symposium on Virtual and Augmented Reality (SVR) - Cuiabá - Mato Grosso, Brazil (2013.05.28-2013.05.31)] 2013 XV Symposium on Virtual and Augmented Reality - A Markeless

A Markeless Augmented Reality Tracking for Enhancing the User Interaction during Virtual Rehabilitation

Alexandre Klein Instituto de Informática

UFRGS Porto Alegre, Brazil

[email protected]

Gilda Aparecida de Assis Departamento de Informática

UTFPR Pato Branco, Brazil [email protected]

Abstract— Virtual Rehabilitation provides a range of technological and clinical developments in the field of virtual reality and augmented reality applied to rehabilitation. In this context, a system for upper-limb motor rehabilitation of stroke patients based on augmented reality was developed. This system aimed providing the motor imagery using a virtual three-dimensional arm that replaces the paralyzed arm in a real-time image of the patient. During the task execution in the augmented reality environment, the physiotherapist had guided the patients while they saw themselves and surroundings, as in a mirror. Although not achieving statistical significance, the Fugl-Meyer results of these case studies suggested that the participants were able to use the technology and they had larger shoulder range of motion of the affected hand post-training using the augmented reality system. However, many faults in the detection and recognition of physical markers were occurred whenever there was partial obfuscation or imperfect capture of the marker’s image. For this reason, a new version of the system was developed to provide an augmented reality system without markers, and thus, aiming to improve the usability of next clinical trials.

Keywords: Augmented reality; virtual rehabilitation; markless tracking

I. INTRODUCTION The stroke is a worldwide leading cause of disability,

which affects men, women and even children, with higher incidence in the elderly [1]. It produces motor, sensory and cognitive impairments as well as a decreased ability to withstand efforts [2]. Upper-limb hemiparesis is one of the most debilitating effects of a stroke and is the most common impairment underlying functional disability [3].

Post-stroke rehabilitation has focused on reducing motor impairment and minimizing physical disability through the functional reorganization of the brain, when not affected brain cortical areas assume the functions of the damaged brain regions [4].

Many of newer post-stroke rehabilitation treatments take advantage of technological advances such as the improvement in robotic design, the development of haptic interfaces, and the advent of human-machine interactions in virtual reality. These technologies are being investigated in

an attempt to develop more effective strategies to reduce the physical disabilities resulting from stroke damage [5].

Virtual Reality (VR) technology has emerged as a potential method in the field of rehabilitation with advantages, such as a controllable environment, salient feedbacks, the sense of presence, entertaining treatments and digital records in the VR rehabilitation systems [6].

However, when immersed in a VR environment, the patients cannot see their hands and have to position the hand relative to the virtual environment. The movements of the hands and the interactions with the virtual objects are in separate independent coordinate references, and this would affect the effectiveness of these rehabilitation systems [7].

Augmented Reality (AR) technology is capable of addressing these challenges by superimposing virtual objects onto the physical world, in which the users can interact with virtual and real objects using their hands directly. Compared with VR systems, AR-based rehabilitation systems could provide a better realism feeling to the patients during the exercising process, while retaining the advantages of the VR systems applied to rehabilitation. In the AR environment, the virtual objects and the hands of the patients are in the same physical space and the patients can visualize the real environment around them [8].

A clinical protocol using an interactive workbench called virtual reality mirror (VR-Mirror) and combining physical and mental practice for post-stroke rehabilitation was proposed in [9]. It used virtual reality technology to provide patients with auditory and visual cues to direct their attention to the dynamic structure of a movement, thus contributing to the generation of the motor imagery. The results of applying the VR-Mirror protocol to a group of nine post-stroke patients with chronic motor impairment of the upper limb suggested that five of the nine hemiplegic patients showed a reduction in disability, measured by the Fugl-Meyer scale and Action Research Arm test, without loss of motor gains after discharge. The authors concluded that these results encourage further investigations on the role of the computer-guided mental practice in the upper limb rehabilitation [10].

Another work trained the shoulder/arm motor control and grasp strength of chronic stage post-stroke patients using a large display and a PC running custom virtual reality games. The results of this study indicated that the participants were

2013 XV Symposium on Virtual and Augmented Reality

978-0-7695-5001-5/13 $26.00 © 2013 IEEE

DOI 10.1109/SVR.2013.43

117

Page 2: [IEEE 2013 XV Symposium on Virtual and Augmented Reality (SVR) - Cuiabá - Mato Grosso, Brazil (2013.05.28-2013.05.31)] 2013 XV Symposium on Virtual and Augmented Reality - A Markeless

able to use the technology and they had larger shoulder range of motion and pinch strength of the affected hand post-training. Also, the participants reported an improved ability to perform activities of daily living with the affected arm [11].

Stroke patients often suffer from the deterioration of other abilities, such as muscle dexterity and hand-eye coordination. To address this issue, a rehabilitation system for hand-eye coordination and finger dexterity based on the AR technology was presented in [8]. In this AR system, a virtual piano game was designed to provide the training using a data-glove. Several markers were attached on the data-glove to obtain the position of the hand and the spatial relationship between the hand and the virtual piano keys. The users were able to play the virtual piano keys using the real hand in the real environment. Multi-modal feedbacks were provided according to the performance to facilitate and encourage the patients during the rehabilitation.

Firstly, this paper presents an AR system, named NeuroR, for therapy for upper-limb motor rehabilitation of stroke patients. This system aims to provide the motor imagery for the stroke patient using a virtual three-dimensional arm that replaces the paralyzed arm in a real image of the patient.

Motor imagery may be defined as a dynamic state during which representations of a given motor act are internally rehearsed in working memory without any motor output. This type of experience implies that the subjects feel themselves performing a given action. Studies indicated that motor imagery belongs to the same category of processes involved in programming actual actions, with the difference that in the latter case, the execution would be blocked at some level of the cortical-spinal flow [12].

In the NeuroR system, the training works in the following way: The physiotherapist guides the patients so that they do the impaired upper-limb task in the AR environment, where they can visualize themselves and surroundings, just like a mirror. The results of two case studies showed that when asked to imagine their own movement of arm by looking at their image with the virtual arm moving in the screen, the patients tried to physically execute the arm’s movement. The virtual arm is a computer generated tridimensional arm superimposed on the captured image from webcam in real time, which executes animations triggered by the physiotherapist or bioelectrical signals of the patient.

Second, some problems referring to detection and recognition of markers are addressed and a proposed solution for enhancing the user interaction during virtual rehabilitation is described.

II. METHODS

A. Rehabilitation Setup For the rehabilitation sessions, conducted by a

physiotherapist, each stroke patient sits in front of the webcam, so the camera can capture his/her front view with whole arms in the field of view. They see themselves through the images captured on real time and projected on a projection screen. The physiotherapist guides the patients to perform movements with the uninjured arm and then with the impaired arm. The rehabilitation setup is depicted in Fig. 1, including:

� Electromyography device. � Web cam. � LCD projector. � Projection screen. � Tripod. � Glove. � Computer. The glove makes easy to detect and later process the

paralyzed arm image, captured by the web cam in real-time. In addition to the devices shown in Fig. 1, there was a

need for a mobile physical marker, which could be adjusted to each patient's shoulder and thus indicate the position for insertion of the virtual arm.

The electromyography device is used to capture electromyography signals from the electrodes placed on the patient's injured arm.

Some adjustments were made in the devices after the first pilot study. The upper-limb spasticity after stroke makes it difficult to wear a common glove with fingers. This observation guided the construction of a new glove without fingers, easier to wear in spastic stroke patients.

Two alternatives were provided to start the execution of the animation of the virtual arm: keyboard and electromyographic signals of a paretic arm muscle. In the case of the keyboard, the therapist presses a different key to start each of the animations of the virtual arm. In the second alternative, the electromyographic signals are captured from electrodes placed on the patient's affected arm. The electrodes are connected to an electromyography device, which records the myoelectric signals.

B. Exercises Set Description The virtual rehabilitation exercises were chosen to inhibit

the stroke pathological behavior, which consists of shoulder retraction, depression and internal rotation, flexion and forearm pronation and finger flexion and adduction.

Three shoulder exercises were selected to be performed by the virtual arm, during the virtual rehabilitation. They are: shoulder abduction, shoulder flexion and shoulder horizontal flexion.

118

Page 3: [IEEE 2013 XV Symposium on Virtual and Augmented Reality (SVR) - Cuiabá - Mato Grosso, Brazil (2013.05.28-2013.05.31)] 2013 XV Symposium on Virtual and Augmented Reality - A Markeless

Figure 1. Rehabilitation Setup of the NeuroR system

Shoulder abduction is the act of lifting the arm out to the side of the body. It ranges from 0 -180 degrees (Fig. 2). Shoulder flexion refers to the up and down movement of your arm in front of your body. This movement ranges from 0 to 180 degrees (Fig. 3). Shoulder horizontal flexion moves the arm in front of the body, with backhand facing down. It ranges from 0 to 40 degrees.

C. EMG Acquisition and Processing As cited in the section A, whereas the electromyography

signals (EMG) exceeding a threshold, the execution of the animation of the virtual arm starts.

The NeuroR system analyses the EMG intensity during the time of contraction. One way to reduce the variability of the EMG signals is to eliminate very sudden variations of the amplitude values of the raw signal by smoothing the curve. The averaging was chosen as a technique for smoothing.

The root mean square (RMS) value of the raw surface EMG signal was adopted to quantify the EMG signals of the stroke patients.

The RMS value was calculated by electromyography data, recorded from the middle deltoid muscle. The EMG signal was analyzed in time domain, from RMS value, in 100 ms intervals (Hamming).

An application programmer interface (API) was implemented in C-sharp language in order to process RMS and pack messages sent between the electromyography device and the NeuroR system

D. Experimental Procedure The purpose of the case studies was to evaluate the

efficacy of the training based on Augmented Reality (NeuroR system) in a group of subjects with stroke and to test the feasibility of applying the AR system in a clinical or home-based environment.

Two case studies have been conducted. The first study occurred during two months (eight subjects). The second study occurred during three months (four subjects). In both

studies two groups were selected, a control group (CG) and an experimental group (EG).

The inclusion criteria of patients to the studies were: (1) Subject is a male or female between the age of 21 and 70. (2) Subject has experienced a last ischemic or hemorrhagic stroke more than one year prior to randomization. (3) Subject has spasticity at most grade 2 in the Modified Ashworth Scale[22]. (4) Subject had agreed to participate and signed the Free and Informed Consent.

The following rehabilitation exercises were selected: shoulder abduction, shoulder flexion and shoulder horizontal flexion.

Both case studies showed that participants presented evidence of improvement in shoulder movements after the treatment using the NeuroR system. More detailed information about many of these results is available in [22].

Figure 2. Virtual 3D arm performing the shoulder abduction exercise.

119

Page 4: [IEEE 2013 XV Symposium on Virtual and Augmented Reality (SVR) - Cuiabá - Mato Grosso, Brazil (2013.05.28-2013.05.31)] 2013 XV Symposium on Virtual and Augmented Reality - A Markeless

Figure 3. Virtual 3D arm performing the shoulder flexion exercise.

III. AR TRACKING AR technology consists in adding computer-generated

information (2D/3D) to a real video sequence in such a manner that the real and virtual objects appear coexisting in the same world. To get a realistic illusion, the real and virtual objects must be properly aligned with respect to each other, which require a robust real-time tracking.

Most of the AR computational costs are due to the tracking process, to align properly the real and virtual objects with respect to each other and to produce a realistic illusion of fusion between the two worlds. The drawbacks of the tracking technology get drastically worse in an uncontrolled context such as outdoor, where it is difficult to calibrate the environment, add landmarks, control lighting and limit the operating range to facilitate tracking [13].

While a large variety of tracking systems are available (mechanical, acoustic, electromagnetic, ultrasonic, optical, fiducial marker and nature feature tracking), most of those systems are meant to be used in perfectly known contexts, which can be controlled easily.

Among these tracking systems, actual outdoor applications are mostly GPS-based tracking systems. However, the positioning errors and unreachability to indoor area of GPS signals have limited GPS-based AR application. Most indoor AR tracking systems are marker-based systems [14].

The study in [14] developed HMTAR system, to simultaneously recognize user's coordinates and vision

direction by employing infrared invisible marker tracking technique. Since there is no need to place markers in the physical space, the high environmental adaptability feature allows the system to position virtual objects at the desired location, including mid-air, water surface, above flame, or even out field-of-vision.

Marker tracking systems add special patterns to the scene. The main inconvenience is the environment adaptation, although in some cases, this adaptation is feasible and does not involve any obstacle at all [15].

Besides the environment adaptation, fiducial marker occlusion is another shortcoming, as the system fails even if the marker is only slightly occluded. To overcome the occlusion problem, much effort has been made to obtain an accurate and robust tracking system based on computer vision. The approach presented in [16] places multiple markers in the scene to solve the marker occlusion problem. In the same way, authors proposed multiple-layer markers in [17]. Another alternative solution was presented in [15], where a new marker design consisted of adding customized textured borders to the marker.

On the other hand, markerless tracking systems (nature feature tracking) have solved the occlusion problem. These solutions use natural features or a 3D model to calculate the camera pose. These alternatives do not need environment adaptation, because they rely on natural features that are in the scene or lie on the surface of the model to be tracked. Thus, in some cases, a scene rich in texture is required, whereas in other cases, the 3D model must be known [15].

Only accurate, robust and stable tracking can empower a natural interaction with AR. However, markerless visual tracking algorithms are influenced by several critical parameters such as: the texture richness and the texture repeatability of the objects to be tracked, the camera motion and speed, and the changes of the object scale in the images and variations of the lighting conditions over time [18].

The markerless outdoor AR system described in [13] treats walls, building facades and ground as natural plane surfaces, recovering the camera position by estimating the reverse projection from the 3D world to the image using a Random Forest classifier. It requires a training step that takes less than 5 minutes, using a set of 1,000 synthetically generated new examples. While it is a good algorithm for outdoor environments, it is too computationally expensive for a system that will be run in a controlled environment.

A more specific study is presented in [19], using AR to enhance conventional books, using a generic randomized forest to quickly recognize the page and calculate the camera pose. It divides the image in sub regions to resolve the problem of dropping the recognition rate under complex backgrounds and proposes an adaptive keyframe-based tracking method to avoid jittering.

It´s a fast algorithm and, as it uses a random forest based classifier, it still needs training. We decided that a more specific algorithm was needed to the NeuroR application due to the flexible nature of the human body.

120

Page 5: [IEEE 2013 XV Symposium on Virtual and Augmented Reality (SVR) - Cuiabá - Mato Grosso, Brazil (2013.05.28-2013.05.31)] 2013 XV Symposium on Virtual and Augmented Reality - A Markeless

IV. PROPOSED MARKERLESS TRACKING ALGORITHM The NeuroR system applied in previous case studies was

based on the concept of planar fiducial markers, i.e., pre-determined drawings included in the physical environment used to extract the current 3-D coordinates of the virtual object in relation to the real camera.

The AR markerless tracking algorithm was developed to address the problems inherent in the technique of fiducial markers, e.g., partial or total obfuscation when the patient moves; misalignment of the real with the virtual arm; imperfect capture of the marker’s image, which are not recognized; and the need for markers in itself, which need to be placed and removed from the shoulders of the stroke patients constantly. Furthermore, the fiducial marker was fixed on the shoulder of the injured limb with the aid of a pin so as to prevent falls during use of the system. This procedure resulted in some failures during rehabilitation sessions.

In this context, a new version of the NeuroR system was developed to provide an augmented reality system without markers, and thus, improving the usability of next clinical trials. Also, this improvement has been proposed because the placement of markers on the shoulder’s patients, wearing gloves and background capture process take a long time and are difficult to perform by patients and therapists.

The proposed markerless visual tracking algorithm used techniques for recognizing moving objects, moving match and face detection. This markless tracking algorithm was proposed in early 2010, when Microsoft Kinect’s skeleton tracking, which is other inexpensive markless tracking alternative, was under development. Microsoft Kinect was released in November 2010.

This new version of NeuroR system was drawn for use in controlled environments, which eliminates some common difficulties such as inadequate lighting and interference from background noise. The room to be used should preferably have a white wall, with adequate lighting and sufficient physical space. It is also suitable for handling video, adding important factors such as the temporal stability of motion tracking and motion correction using previous data.

A common problem in the captured images with a white background next to a patient is the presence of the shadows. Lighting on both sides of the camera pointed at the patient by means of diffusers, helps solve the problem. It should be noted that the angle and distance of the lights are correct as well as brightness. If the light intensity is too high, the background reflects back to the subject and "burning" the pixels in the contour of the body. If the light intensity is too low, the background is no longer being white and starts displaying much noise.

The scheme described in Fig. 4 shows an arrangement of cameras and lights widely used in photographic studios or television programs, which was chosen because it is efficient to focus on the subject. Although practically remove shadows and produce a clean image, there are minimal differences in brightness that can be removed using a normalization algorithm or color balance.

The proposed markerless tracking algorithm is based on a skin detection algorithm and a face detection method. Considering that the actual area of a face does not vary widely between different people, it is possible to estimate the correlation function that returns the distance between the camera and face. This estimation is based on the area occupied by the face image.

Having the position and size of the face computed, achieved by the algorithm presented in [20], a reverse search is performed using control points in specific locations, i.e., the estimation of the position of the bones of the patient is carried out from the face up to the shoulder in order to correctly represent 3-D arm and eliminating the injured arm on the resulting image.

The process begins with the face detection algorithm [20], which returns the position and size of the face of the individual. It is a fundamental step for the functioning of the system and starts from the assumption that the face is the part of the human body easier to detect, since it remains relatively consistent all the time. The proposed algorithm in this paper takes advantage of this characteristic, together with the fact that the human body has certain fixed proportions, which makes it easier to find regions of interest. To accelerate the processing, the detection is interrupted as soon as the first face is found.

Then, in the region where it found the face, an adaptive skin detection algorithm [21] is used to find the area corresponding to the neck of the patient. It is quite fast and the output mask, together with an edge detector, finds the contour of the collar of the shirt of the subject, with good precision. This position is important because it serves as the start position of the next algorithm, which finds the position of the shoulder and conducts a search to find the contour of the shoulder and the beginning of the arm.

Figure 4. Scheme of the physical environment

121

Page 6: [IEEE 2013 XV Symposium on Virtual and Augmented Reality (SVR) - Cuiabá - Mato Grosso, Brazil (2013.05.28-2013.05.31)] 2013 XV Symposium on Virtual and Augmented Reality - A Markeless

In the proposed algorithm, five control points are estimated (Fig. 5):

Intersection between shirt and neck (1); Bottom of the face (2); Shoulder area (3); Start of the cutting area of the arm (4); End of the cutting area of the arm (5). The region of control point 1 is helpful for the algorithm

indicating where the shoulder searching algorithm should start the scan, always coinciding with an edge. The algorithm searches for the neckline combining data obtained by Canny algorithm and the skin color detection.

The point in the bottom of the face (2) is calculated from the data of the face detection phase and serves to direct the search for this region and avoid wrinkles or drawings on the subject’s shirt.

The point of shoulder area (3) is where the virtual arm will be drawn. Start and end points of the cutting zone will be used to paint the background color over the real arm.

The control points (4) and (5) determine the cutting area between the real and the virtual arm. In a more advanced stage of the algorithm, the line between these two points will be the region where the arm is replaced by actual the background. The position of the point 5 is a projection from the point 4 towards the center of the image. Point 4 is calculated following the line of the shoulder toward lower image for a specified number of points in the initial settings.

With the control points detected, there is a reverse search, which processes the image with a Canny edge detector to find the edges closest to the control points. The start of the processing is the creation of a tree of the points with its root being the collar of the shirt. Points detected as edges are added in this tree, while processing proceeds toward the shoulder.

Figure 5. Estimated control points.

Initially, the tree depth is proportional to the width of the region of interest. Soon after inserting all points, a pruning step is used, which does a search in depth, removing the nodes that do not present interesting information to the algorithm. The decision whether information is interesting or not is based on the angle difference between the current point and the previous ones. When a node in the tree does not change the angular trend of its predecessors, it is removed.

The nodes of the tree are evaluated in relation to its distance from the control points and values are stored in each. In the end, the paths are traversed and values are added. The path with the highest value, ie, which is closest control points is chosen to be used. When the patient is at rest, in the region near the point 3 there is a downward angle, which is marked as the shoulder area and the anchor point is determined where the three-dimensional arm should be drawn.

Between frames, an algorithm for tracking is used to ensure stability in these control points, even when there is fault in any other step of the detection, besides there is filtering to avoid jitters and the effect of disconnection between the real and virtual arm. Finally, the removal of the real arm is done and the virtual one is rendered.

Fig. 6 shows the flowchart of the system. In the preprocessing phase is generated a copy of the image captured by the camera. This image is converted from the RGB (red, green, blue) to grayscale image. The histogram function allows specifying a tolerance value in the search for the minimums and maximums. It is used to prevent noise could generate false values. On this image, smoothing is performed, which removes many of the high-frequency noise and eventually stabilize over the image between frames captured from video.

When the shoulder comes out of rest position or there are failures in face detection, the system loses its main point of reference. Thus, the system no longer act as a detector, where each frame contained enough information to recreate all checkpoints and independent worked of their predecessors. From this point forward, the system begins to act as a tracking, using back references to the generation of new data. The tracking functions require as input parameters an image and a region of interest. They identify each frame based on the previous frame, the new region of interest. These data are used as feedback to the face detector system. The points to be tracked are the shoulder arm and face, to either continue the three-dimensional drawing of the arm, avoiding a break in the immersion of the patient, as well as feedback to the system itself, accelerating the search function of the face.

V. RESULTS A preliminary study applied the new version of NeuroR

system to a stroke patient, who meets the criteria for inclusion in earlier clinical trials. As a result, the markless NeuroR system found the correct position for the insertion of virtual arm. However, there were problems such as the scale of the virtual arm and the failure to remove the hand of the injured arm (Fig. 7).

122

Page 7: [IEEE 2013 XV Symposium on Virtual and Augmented Reality (SVR) - Cuiabá - Mato Grosso, Brazil (2013.05.28-2013.05.31)] 2013 XV Symposium on Virtual and Augmented Reality - A Markeless

Figure 6. Flowchart of the Markerless Tracking Algorithm

Different from tests in laboratory, applying the system in patients, it was realized that many of them, maybe because they are victims of stroke, have a natural trend to rest their hand on the leg, which revealed a failure in the algorithm, where the texture to be painted in place of the hand, even in controlled environments cannot be simply background color, but a function that correlates the colors of the edge region to be removed in order to reconstruct a relevant texture.

Tests were performed to relate the distance from the patient to the camera with the size of virtual arm to be drawn. After gathering a few values, it was observed that the square root of the area of the face decreases linearly with the increasing distance between the subject and the camera. We used a spreadsheet to calculate the formula with the lowest error rate detected between distance and actual distance. Figure 8 shows the measured values and the trend line generated. This curve is dependent on the camera used because changing the viewing angle of the lenses result in a differential area size of the face in the image, while maintaining a fixed distance. Therefore, the values are defined in an external camera setup.

Figure 7. Patient uses the marker tracking system (left) and markeless

tracking system (right).

50 100 150 200 250 300 350 4000

20

40

60

80

100

120

140 f(x) = 5924,08 x -̂0,85R² = 1

Area of the face (PX)

Dis

tanc

e (C

M)

Figure 8. Calculated distance vs size of the face on the image.

VI. CONCLUSION

This paper presented promising results for upper-limb motor rehabilitation, since in two case studies with the system NeuroR applied to patients that suffered a stroke more than a year; enhancements have been observed in the motor components of shoulder range of motion and speed, measured by the evaluation instruments adopted.

This work provided a new approach to training of movements in the motor rehabilitation process, since even patients without any motor output can train the movements of the injured arm with the aid of the virtual arm, which is depicted attached to the patient's body to extend skills patient's actual arm.

Furthermore, the system NeuroR may be used either in the rehab center as well as in home.

123

Page 8: [IEEE 2013 XV Symposium on Virtual and Augmented Reality (SVR) - Cuiabá - Mato Grosso, Brazil (2013.05.28-2013.05.31)] 2013 XV Symposium on Virtual and Augmented Reality - A Markeless

The markerless tracking algorithm aims to improve the usability and the interaction of this system, avoiding the use of markers and ensuring a more realistic positioning of the virtual arm in place of the injured real arm. The results of the prototype were feasible because, even with the error in the step of removing the arm real image, it was possible to detect and to properly position an virtual 3D arm, no dependency of the fiducial markers or objects that hinder the overall usability of the system.

Future work will include improving the module of removal of the real arm, using information from the edges to rebuild the background, rather than just paint it with the background color. Research should be carried out to the Kinect and depth camera to investigate the possibility of improvements in the capture, perhaps even targeting more efficiently background.

REFERENCES [1] Heart and Stroke Facts and Statistics, American Heart Association,

2001. [2] T. E. Twitchell, “The restoration of motor function following

hemiplegia in man,” Brain, vol. 74, no. 4, pp. 443–480, 1951. [3] S. J. Page, P. Levine, S. A. Sisto, and M. V. Johnston.”Mental

Practice Combined With Physical Practice for Upper-Limb Motor Deficit in Subacute Stroke, “ Physical Therapy, vol. 81, no. 8, pp. 1455-1462, August 2001.

[4] E. Taub, G. Uswatt, and D. M. Morris. “Improved motor recovery after stroke and massive cortical reorganization following Constraint-Induced Movement therapy,” Physical Medicine and Rehabilitation Clinics of North America, pp. 77-91, 2003.

[5] A. S. Merians, H. Poizner, R. Boian, G. Burdea, and S. Adamovich. “Sensorimotor training in a virtual reality environment: Does it improve functional recovery poststroke?,” Neurorehabilitation and Neural Repair, vol. 20, no. 2, pp. 252–267, 2006.

[6] Holden MK (2005) Virtual environments for motor rehabilitation: review. Cyberpsychol & Behav 8(3):187–211.

[7] Pareto L, Broeren J, Goude D, Rydmark M (2008) Virtual reality, haptics and post-stroke rehabilitation in practical therapy. In: Proceedings of 7th International conference series on disability, virtual reality and associated technologies (ICDVRAT) with ArtAbilitation, Maia, Portugal, 2008 September 8–10, pp 245–252.

[8] Y. Shen, P.W. Gu, S. Ong, and A.Y.C. Nee, A novel approach in rehabilitation of hand-eye coordination and finger dexterity. ;In Proceedings of Virtual Reality. 2012, 161-171.

[9] Gaggioli, A. et al. Training with Computer-Supported Motor Imagery in Post-Stroke Rehabilitation. In: CyberPsychology & Behavior, Vol. 7, No. 3, pp. 327–332, 2004.

[10] A. Gaggioli, A. Meneghini, M. Pigatto, I. Pozzato, G. Greggio, F. Morganti, and G. Riva. “Computer-enhanced mental practice in upper-limb rehabilitation after cerebrovascular accident: a case series study,” Virtual Rehabilitation, pp.151-154, 27-29 Sept. 2007.

[11] G. C. Burdea, D. Cioi, J. Martin, D. Fensterheim, and M. Holenski.”The Rutgers Arm II Rehabilitation System—A Feasibility Study”. IEEE Transactions On Neural Systems And Rehabilitation Engineering, vol. 18, no. 5, pp. 505-514, October 2010.

[12] J. Decety. “The neurophysiological basis of motor imagery.” Behavioural Brain Research, no. 77, pp. 45-52, 1996.

[13] I. Barandiaran, C. Paloc, M. Grana. “Real-time optical markerless tracking for augmented reality applications”. J Real-Time Image Proc (2010) 5:129–138.

[14] C. Kuo, et al., “An invisible head marker tracking system for indoor mobile augmented reality”, Autom. Constr. (2012).

[15] Álvarez, H., Leizea, I., and Borro, D., “A new marker design for a robust marker tracking system against occlusions”, Computer Animation and Virtual Worlds, Vol 23, No 5, pp. 503-518, September/October 2012.

[16] Kato H, Billinghurst M. “Marker tracking and HMD calibration for a video-based augmented reality conferencing system”. In Proceedings of the 2nd IEEE and ACM International Workshop on Augmented Reality (IWAR’99), San Francisco, California, USA,1999; 85–94.

[17] Tateno K. “A nested marker for augmented reality”. In IEEE Virtual Reality Conference (VR’07), Charlotte, North Carolina, USA, 2007; 259–262.

[18] Sebastian Lieberknecht, Selim Benhimane, Peter Meier, Nassir Navab. “Benchmarking template-based tracking algorithms”, Virtual Reality (2011) 15:99–108.

[19] C. Kyusung, J. Jinki, L. Sang-Wook, L. Sang Ok and Y. Hyun Seung. “Real-time recognition and tracking for augmented reality books”. In Comp. Anim. Virtual Worlds 2011; 22:529–541.

[20] P. Viola and M. Jones. “Rapid Object Detection using a Boosted Cascade of Simple Features,” Proc. IEEE Conf. Computer Vision and Pattern, vol. 1, Kuai, HI, USA, Dec. 2001, pp. 511-518.

[21] DADGOSTAR, F.; SARRAFZADEH, A. An adaptive real-time skin detector based on Hue thresholding: A comparison on two motion tracking methods, Pattern Recognition Letters, Nova Zelândia, 2006.

[22] ASSIS, G. A. NeuroR, um sistema de apoio à reabilitação dos membros superiores de pacientes de vítimas de acidentes vasculares encefálicos. Tese de Doutorado em Engenharia. EPUSP. São Paulo. 2010.

124