Electrooculogram (EOG) based Mouse Cursor Controller Using the Continuous Wavelet Transform and Statistic Features

This study design a system prototype to control a mouse cursor's movement on a computer using an electrooculogram (EOG) signal. The EOG signal generated from eye movement was processed utilizing a microcontroller with an analog to the digital conversion process, which communicates with the computer through a USB port. The signal was decomposed using continuous wavelet transform (CWT), followed by feature extraction processes using statistic calculation, and then classified using K-Nearest Neighbors (k-NN) to decide the movement and direction of the mouse cursor. The test was carried out with 110 EOG signals then separated, 0.5 as training data and 0.5 as test data with eight categories of directional movement patterns, including up, bottom, right, left, top right, top left, bottom right bottom left. The highest accuracy that can be achieved using CWT-bump and kurtosis is 100%, while the time needed to translate the eye movement to the cursor movement is 1.9792 seconds. It is hoped that the proposed system can help assistive devices, particularly for Amyotrophic Lateral Sclerosis (ALS) sufferers.


Introduction
Modern technology in the health sector in monitoring and as a tool for bodily functions makes it very easy for its users. Eye-tracking technology has enabled the movement of the human eye to be used as a Human-Computer Interface (HCI) [1], [2]. The application of the HCI system based on eye movements as a human-computer interaction communication was applied to patients with Amyotrophic Lateral Sclerosis (ALS) or other diseases that experience paralysis of the hands [3]- [6]. ALS was a neurodegenerative disease of motor nerve cells that develops rapidly and is caused by damage to nerve cells in the brain [7], [8]. Patients with ALS experience paralysis of the muscles in their limbs and speaking difficulty; thus, it was difficult for ALS people to use their hands or voice to communicate with other people [7].
Apart from being used in the HCI field, human eye movement was also useful in various fields, such as healthcare, security systems, and interface design [9]- [11]. In intelligent transportation, eye movements were also useful for detecting the driver's attention level, which indicates the level of driver's drowsiness [12], [13].
On eye movement, the cornea and retina's potential produces a source of the Electrooculogram (EOG) signal. The application of EOG based control system has been commonly proposed, for example, in the control of mobile robots [14] and wheelchairs [15]- [17]. Meanwhile, computer interaction development has recently become an important issue to implement, for example, cursor control. Horizontal and vertical eye movement and flashing signals controlling the mouse cursor system by moving the direction from the EOG-based cursor [18]. Therefore, this study proposes a mouse cursor control system using EOG signals. The proposed system consists of an EOG signal recorder, USB interface, and feature extraction and decision-making applications. The raw EOG signal was decomposed using a wavelet transform and then calculating the statistical features into a feature vector that becomes the classification algorithm's input. This system was designed to move the mouse cursor, including up, bottom, right, left, top right, top left, bottom right, and bottom left. This paper is structured as follows, section 2 describes the design and implementation of the proposed system, including hardware design, software design, feature extraction, and classification process. Section 3 contains an explanation of implementation results followed by a discussion. The final section briefly describes the conclusions and implications of this study.

System Design and Implementation
The design and implementation of the system in this study were to adopt the human-computer interface (HCI) mechanism. The output of this system was a mouse cursor movement control with an EOG signal. Figure 1 shows the two components of the EOG consisting of horizontal and vertical obtained from five electrodes placed around the eye. These were attached on the edges of both eyes and also over and under the eye. The middle electrode serves as a reference. The EOGv1 and EOGv2 electrodes obtain relative corneal-retinal vertical motion of the eye, while EOGh1 and EOGh2 get a signal from the potential relative to the horizontal movement of the eye. The component for horizontal EOG signal acquisition is obtained by subtracting the left-eye electrode signal from the right eye electrode signal (EOGh = EOGh2 -EOGh1). The vertical EOG component was obtained by subtracting the signal at the eye's bottom edge from the signal at the top edge of the eye EOGv = EOGv2-EOGv1. EOGh and EOGv were notations that denote the horizontal and vertical elements of EOG.

Hardware Design
This system consists of hardware for EOG signal acquisition and software for signal processing and decision-making, as shown in Figure 2. EOG hardware contains components for signal acquisition, consisting of an instrumentation amplifier, low pass filter (LPF), high pass filter (HPF), and level shifter. The instrumentation amplifiers amplify the electrode signal leads. The instrumentation amplifier component used in this study was INA118P with an amplification of 1000 times.   Figure 3 shows the schematic design of the 2-channel EOG amplifier used in this study. The HPF implemented in this study has a cut-off frequency of 0.05 Hz to eliminate low-frequency noise due to body movement. The value of R was obtained by applying Equation (1).
Here the value of

2.2
CF  = then the R-value was obtained Meanwhile, the LPF was designed to have a cut-off frequency of 40 Hz to reject a large amount of high-frequency noise such as muscle noise. The low pass filter was designed using the Butterworth 4th order filter method and the Sallen-key circuit type, as shown in figure 4.

Figure 4. Schematic design of low pass filter 40 Hz
To match the reading range of the ADC component, the signal was amplified by the final amplifier. Before amplification, the EOG signal has a relatively small amplitude of about 3.5 mV, so that at the end of the amplifier, 120 times gain was required. The final amplifier was designed using OP07. Then, so that the ADC can ultimately convert all EOG signals, a level shifter was designed to make all EOG signal components positive. The schematic of the amplifier and the level shifter is shown in Figure 5.

Software Design
The design software developed was used to display the EOG signal's output, feature extraction, classification, and simulation of the mouse cursor. The software design with ADC reading uses the Arduino IDE. It performs serial calibration with python to perform mouse cursor direction movements with the py.mouse library data obtained from python with *.csv format.
At the classification stage, there were training data and test data. The training data was used as 57 the calibration data when sampling the mouse cursor motion data, while the test data with test data that has been adjusted with the calibration data was processed to determine the accuracy with the method used in this study. The classification process was shown in Figure 6.

Figure 6. Classification process
The systematic workflow was started by signal acquisition using the EOG hardware, followed by the signals' amplitude normalization. The signal was decomposed by the wavelet transform then characterized using statistical analysis including entropy, mean, kurtosis, and skewness. This feature vector was then stored as training data for each eye movement. The new input feature vector was then classified based on the vector closest to the training vector. The classification process was carried out using k-Nearest Neighbor (k-NN) with k = 3. The k-NN was chosen because it has low computational cost and effectiveness in hardware implementation.

Feature Extraction and Classification
Feature extraction in this study is used to calculate the features contained in the signal as the first step in signal classification. Feature extraction is calculated on the wavelet decomposition signal. In this study, statistical calculations were used for feature extraction. The calculated statistical parameters include:

Mean
For a N number data of a set X , the mean ()  can be calculated using (2)  Here, the mean, the  and N is the standard deviation, and the number of data, respectively.

Kurtosis
Kurtosis calculates the relative sharpness of a signal's distribution curve, which calculates using (5).
( ) These parameters then become the feature vector as input fork-NN to be classified. In this study, the method of measuring the distance in k-NN is the Euclidean method.

Result and Discussion
This section discusses the results of testing and analysis of the system that has been implemented. This test aims to determine system performance. Testing was done during eye movement to control mouse movement. The test was carried out on seven individuals with normal vision by moving the sun horizontally (left and right movement) and vertically (up and down movement). Figure 7 shows an example of an EOG signal when the eyeball is left and right, respectively. This signal is then decomposed with a wavelet, and its statistical characteristics are calculated.
The test scenario consists of four procedures. The first procedure was equipment preparation, which checks and verifies the connection of the equipment used. This procedure was done to ensure all electrodes' positions are confirmed and ready to be used. The second procedure was user preparation, which focused on the electrodes' placement in the participant's face. Before the electrodes were placed, the face surface must be cleaned using a gel cleanser. The vertical electrodes were placed above the right eyebrow, and the lower lid, with distance, is set for about 1 cm and 1.5 cm, respectively. The horizontal electrodes were placed in the outer canthi for about 1.5 cm on each side. The reference electrode was placed on the forehead. The third procedure was system calibration. It was started by the calculation of eye blinks and movement. Thus it can be used as the system's threshold. The threshold for each participant was calculated by calculating the amplitude of their various eye movements. The eye movement was measured by giving the participants visual stimulation using a video showing a moving square object. The square moved to five different locations and stayed for five seconds on each location. The last procedure was exiting the calibration process. The calibration process was ended when the participants make a spontaneous blink using the right eye.
In EOG signal processing, there were three types of CWT wavelets used in this study: morse, amor, and bump. The feature extraction method was done using the statistical features of mean, entropy, skewness, and kurtosis. Before the testing phase, a system training stage using Euclidean distance with a value of k = 3 was performed using the training data. After that, the testing data was fed to the system to be classified.  Figure 8 shows that the effect of wavelet types and statistical features on the accuracy of the generation. The result shows that there is no significant difference between the use of statistical measurement and entropy. However, the signal sharpness analysis using kurtosis in the bump CWT can provide the best performance, which was 100%. Since the EOG signal was not symmetrical, signal analysis using skewness could not give a good result. Therefore, the use of skewness achieves the lowest accuracy of 69%.
Furthermore, the computation time for each test scenario was shown in Figure 9. The kurtosis feature takes longer than other features (1.9792 seconds) but provides the highest accuracy. The difference in processing time was not significant, so that if this system is applied, the characteristic of kurtosis was most suitable to be used by considering the accuracy. The mouse control system proposed in this study is expected to help people with disabilities when they want to operate a computer with simple commands. A control system using EOG signals may be the last alternative if the hands and feet are also disabled. This proposed study can complement the previous study by Rusydi et al. [19], where muscle signals and EOG can be utilized for the control system.

Conclusion
In this study, a mouse control system using EOG signals has been successfully implemented. The EOG signal was decomposed using a wavelet transform, and then the statistical features