{'fraction_non_alphanumeric': 0.02804774083546462, 'fraction_numerical': 0.008354646206308611, 'mean_word_length': 5.003582395087001, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
ROBOT-BASED IMAGE ANALYSIS FOR EVALUATING REHABILITATION AFTER BRAIN SURGERY

After certain types of brain surgery, patients are often affected by changes in both their dynamic balance and facial disorder. Because rehabilitation takes several months, it is important that both doctors and patients are able to monitor progress quantitatively. At present, such quantification is subjective and highly dependent on the doctor’s opinion. Thus, we here investigate the use of robot-based image analysis for measuring rehabilitation. To evaluate a patient’s dynamic balance, we developed a mobile robotic platform that uses a stereovision camera (MS Kinect) to capture a video of the subject walking along a hospital corridor. To evaluate a patient’s facial disorders, the same camera is used in a static mode to detect and capture precise facial movements that the subject is asked to perform. From these videos, specific patterns can be extracted for rehabilitation process description.


Introduction
Modern diagnostics benefits from the development of computational and cybernetic systems. It is because all branches of information engineering offer effective tools for patient observing and analysis. It is useful in combination of both digital signal processing methods based on advanced mathematical algorithms and experience of specialists.
In the first computational case, statistical analysis techniques were employed to detect the -blocker propranolol spiked into human serum [1]. The principal component analysis combined with linear discriminant analysis was used for detection of nasopharyngeal cancer [2]. Different studies deal with colorectal or gastric cancer screening, analysis of globulin in blood or oral cancer using Raman spectra principal component analysis and regression [3], [4], [5], [6].
The second possible approach of information engineering in diagnostics is an artificial intelligence tool. Neural networks improve the brain cancer diagnosis by reducing artifacts [7] or by semiautomatic analysis using a neural network for pattern recognition [8], [9]. Neural networks are employed in discrimination of serum from liver cancer and liver cirrhosis [10]. Other application of computational intelligence can be found in a diagnosis of neck and head cancer [11].  Nowadays, modern medicine uses recent tools from the 3D modelling and computer vision. These systems are effective non-invasive diagnostic methods such as observing and analysing gait patterns. Many papers deal with analysis and diagnosis of Parkinson's disease [12], [13], [14].
Video sequences analysis, computer vision and motion modelling belong to an interdisciplinary area of digital signal and image processing [15] allowing detection, localization, identification (and prediction) of moving object components. Applications can be found in engineering [16], biomedicine [17] and in many further disciplines. The main research branches of computer vision (recently) can be defined as security video sequence analysis and health care video sequence analysis, where the most discussed topics are advances in the field of physiotherapy (where the computer detects if the subject does the exercise well) and diagnostics (see Fig. 1).

Biomedical Background
Balance function is a multisensory system with vestibular, visual and proprioceptive inputs. Vertigo is a complex syndrome that otolaryngologists are facing every day. We can describe it as a disorder of the sense of direction, a disturbed spatial perception of the body. It is one of the most frequently observed leading symptoms [18].
Episodic or permanent vertigo has an impact on the quality of daily life as well as the independence and self-determination of movement. Persisting insecurity results in anxiety and possibly leads to the development of depression [18]. Continuous vertigo may later be associated with a lower physical activity, loss of social contacts and also possible inability to work. If a tendency to fall occurs, it can cause severe complications and care dependency in higher ages [18]. Vertigo is a common symptom of a variety of diseases affecting inner ear and vestibular nerve. Among tumors affecting balance, the most common is vestibular schwannoma (VS).
With an annual incidence of 1:100,000, vestibular schwannoma (VS) is a benign tumor that originates from the Schwann cells of the vestibular nerve [19], [20]. It is the most common tumor affecting temporal bone and cerebellopontine angle [20], [21]. The tumor may appear generally in every age of life, but the main manifestation is between the 3rd and 5th decade [21]. The tumor is generally slow-growing in the internal auditory canal and in the cerebellopontine angle [21], [22]. Larger tumors can compress the brainstem and cerebellum and if not treated can lead to intracranial hypertension and death [21].
Surgery is mainly indicated in tumors bigger than 2.5 cm, in case of annoying symptoms. Surgery leads to total loss of vestibular nerve and eventual labyrinthectomy with eventual signs of peripheral deafferentation. It is unique a model to study processes of the central vestibular compensation. Actual techniques to evaluate balance function relay either on examination of peripheral and central parts of balance system (video-oculography, electronystagmography, head impulse testing, vestibular evoked potentials, and stabilometry). However, methods to evaluate objectively balance system under the dynamic condition are missing.
Furthermore, facial nerve injury and dysfunction are among the most important risks of vestibular schwannoma surgery. Facial nerve palsy has a strong influence on patients' daily life [21]. It results as a brow position and movement problems, inability to close the eye leading to poor lubrication and possible visual lost, the altered oral movement causing articulation problems and facial asymmetries resulting in nonverbal communication problems [23]. The most common tool to asses facial nerve function are clinical scales based on a subjective-clinical assessment of tonus and voluntary mimetic muscle activity. Currently, 19 scales exist to rate clinically the degree of facial function, for example frequently used House-Brackmann scale. [23] The problem is that all such methods are highly observer-dependent.
Surprisingly at present, there are still no objective methods for assessing those functions quantitatively. Such lack of objectivity and absence of quantitative assessment is the main drawback of clinical scales that is crucial for evaluation of reinnervation processes. We developed a system of measurement facial and balance problems to obtain an objective rehabilitation progress description. We use a Kinect camera statically for face analysis and in combination with a mobile robotic platform for gait and dynamic balance description. A scheme of the measurement is in Fig. 2. Each patient is recorded regularly: i) one week before the brain surgery, ii) one week, iii) one month, and iv) three months after the surgery.

Face analysis
For facial problems monitoring, we use the Kinect camera in a static mode. The subject is asked to perform certain movement sequence with his facial muscles (close both eyes, smile, etc.) and we capture a stereoscopic video. From this video, a model of patient's head is created and important points from patient's face are captured (Tab. 1). For this measurement, we developed a GUI shown in the Fig. 6.
the blink of an eye: mouth opening and a smile: where is a y-position of the point .

Gait monitoring
Many papers recently deal with gait recognition [24] and neural diseases detection [25] using a Kinect (2G). This approach eliminates common disadvantages but commonly deals with a quite short range of the Kinect sensor. In our case, the Kinect is placed on a mobile robotic platform that is able to track an object moving behind it (see Fig. 3). With this platform, we are able to record gait over a longer distance.
There are three custom boards on the platform (see Fig. 4) -two motor control boards (one per axis), and main control unit. The motor control board is using LPC1114 (ARM Cortex-M0) chip to control a speed of two motors and current through the motors. The speed of each motor is controlled by PID controller. Both motor control boards are connected to the main control unit as all buttons and the notebook. The main control unit has LPC1768 (Arm Cortex-M3) as processor and there is an adaptive tempomat implemented in the main control board that compute the difference of speeds of the patient and the platform itself checks if the patient is in optimal distance and then updates the speed of the platform. From desired speed and direction is computed the speed for each wheel which is then send to particular motor control board via SPI interface.
Data from the Kinect and the front camera are processed in the notebook (see Fig. 3), where a multithreaded application is running. It also saves an entire communication with the main control unit that provides information about the position of the platform and the voltage level of both batteries. The front camera is used to  detect two navigational beams that are placed at the end of a corridor. From Kinect data, the distance between the patient and platform is computed. A patient is asked to perform 3 exercises in a hospital corridor: i) to walk straight forward, ii) to walk on a line foot-by-foot, and iii) to walk with closed eyes. In all these scenarios, the robotic platform is tracking the patient walking through a corridor and a video of patient's gait is recorded. From the captured video a skeleton model is obtained (see Fig. 5) and used for patient's dynamic balance evaluation.

Results
Our system represents a powerful method to deal with the problem of objective rehabilitation description. The system was tested in Faculty Hospital Královské Vinohrady, Department of Otorhinolaryngology and after a few months and consulting with doctors it provides very promising and useful tool for them. The main advantages are: 1. more objective description -our measurement is not dependent on doctor's opinion, 2. precision -the analysis is more precise than the current state of the art, 3. automation -no user's measurement is needed.  In the Fig. 5 is the generated skeleton captured during a gait excercise in the hospital. The results show the most significant marker's movement in the excercise with closed eyes. Fig. 6 shows the difference between a left and right eyebrow's movement. From the movement of those points, it can be analyzed: i) if there are some irregularities, ii) how fast the movement is, or iii) the level of muscle fatigue.

Conclusion
The proposed methodology shows how modern sensors can be used in medicine application. The main advantage of the described system is that it is capable to describe rehabilitation progress without doctor's subjective opinion. Each patient is analyzed with the same approach during several months after the surgery and it allows to analyze the progress of the rehabilitation.
Results from the testing stage (13 patients) in the hospital are according to doctors promising and it improves significantly their current approach. Because we work with data from the rare disease, we are now in the stage of collecting data from patients to be able to validate the approach on a greater amount of cases.
The application discussed here is related to the analysis of gait and facial disorders, but it could be extended to other areas, including rehabilitation engineering and robotic control systems. Further work will be the development of a numeric score based on the captured descriptors that will be able to quantify the rehabilitation progress.