# Error-Resistant Movement Detection Algorithm for the Elderly with Smart Mirror
## 5 Experimental Results  
### Experimental Setup  
#### Overall Setup  
We prepared three types of experimental data. The threshold value used for the experiment was equal to the user's shoulder width and the previous frame to be compared (frame depth) was 10 frames. The camera was fixed and the distance between target and camera was 2 m. In each scenario, the user was looking at the camera consistently. The movement range is limited to the camera's viewing angle. The experimental environment was indoors. The frame rate was 30 frame/s. The resolution was 640 \(\times\) 480 and the camera used was a Logitech C922 Pro Stream 1080p.  
Motion is detected using the prepared data in a method based on three algorithms for each frame. (1) The first algorithm is a center gravity method (CGM) that compares only the previous center point coordinates, as shown in Figure 1. (2) The second algorithm is an adjacent two-frame method (AFSM) in Equations (1) and (2) and Figure 5, a movement comparison method that compares only the previous frame. (3) And the last algorithm is a vector sum method (VSM), a method for comparing each of the coordinates of the several previous frames, in Equations (5) and (6) and Figure 2.  
The data are classified as fast-moving vector scenarios (FMV Scenario), not moving vector scenarios (NMV Scenario), and slow-moving vector scenarios (SMV Scenario). If the main target is not moving, the data are classified as the NMV scenario. Else, if the main target's overall movement is less than the threshold, the data are classified as an SMV  
Figure 8: Locus of stopped shoulder and micro-movement of elbow points through 600 frames. Looking at the difference between \(\left|\overrightarrow{P_{1}P_{2}}\right|\) and \(\left|\overrightarrow{P_{1}P_{600}}\right|\), there is little difference in the case of the shoulder, but a very large difference in the case of the elbow. This is general evidence that VSM would detect a natural error in a static target and the actual movements of a target.  
scenario. Else, the data are classified as FMV scenarios. In movement scenarios, comparing data only differs in speed.  
The purpose of experimenting SMV scenario is to show that the proposed method could handle slow movement issues. By using the newly proposed method (VSM), a movement that previously used methods (AFSM, CGM) could not detect must now be detected successfully. The purpose of experimenting with FMV and NMV scenarios is to show that VSM does not have an over-fitting issue. By using the newly proposed method, a movement that the previously used method could detect must be detected successfully as well.  
In Experiment 1, we input three types of data and collected movement detection results at each frame. Each method returns the movement detection result as \"moved (1)\" or \"not moved (0)\" at a single frame. In FMV and SMV scenarios, the ground truth of each frame is'moved' while the ground truth of each frame is 'not moved' in the NMV scenario.  
Furthermore, Experiment 2 is planned to measure the displacement of every point between adjacent two frames and calculate the average. The purpose is to show that although it is easy to distinguish between natural error and fast movement by comparing adjacent two frames, it is difficult to distinguish between slow movement and stationary state by comparing adjacent two frames.