## 2 Materials and Methods
### 3D Fall Detection
#### 2.4.2 Features-Based Fall State Classification  
According to [2], a fall event is divided into four states: potential fall state, fall state, no-motion phase, and normal state. In this study, we define an additional recovery state that comes before returning to normal state after the emergency or fall state, so that the ending time of the emergency state can be informed more quickly. We use adaptive features to accurately classify the current state as seen in Figure 6. In the following, each state is described with necessary conditions to state transition illustrated in Figure 15.  
* Normal state: If the ratio of the height difference in the current frame \(h_{d}(c_{k})\) to the height difference in the normal state \(h_{d}(n_{k})\) is larger than the value defined in Equation (14), it is judged to be the normal state again. \[\left\{ \begin{array}{l}\widetilde{h}_{d}=\frac{h_{d}(c_{k})}{h_{d}(n_{k})}>m \ast\theta+n,\;0\leq\widetilde{h_{d}}\leq 1\\ (m,n)=arg\;min\|\tilde{L}(\theta)-L_{fall}(\theta)\|\end{array} \right.\] (14)
* Potential fall state: The most important characteristic of this state is that a human loses balance and the associated vertical velocity increases sharply. In our study, the potential fall state is the state satisfying Equation (15) while tracking. \[v_{v}\geq\delta_{1}\] (15) where \(v_{v}\) is the vertical velocity and \(\delta_{1}\) is a predefined threshold. If it does not enter the fall state for a certain period, it returns to the normal state. * Fall state: The fall state begins when the upper body of a person touches the ground and the height difference between the top and bottom positions of the major axis are significantly different from the normal state. From a technical point of view, 2D information is not enough to determine a fall. Hence, we define three conditions, (16), (17), (18), that use both 2D and 3D features to improve fall detection. To be considered as the fall state, all of the following conditions should be met: \[\left\{ \begin{array}{l}\widetilde{h}_{d}=\frac{h_{d}(c_{k})-h_{d}(n_{k})}{h_{ d}(n_{k})}>m\ast\theta+n,\;0\leq\widetilde{h_{d}}\leq 1\\ (m,n)=arg\;min\|\tilde{L}(\theta)-L_{fall}(\theta)\|\end{array} \right.\] (16) \[\frac{b}{a}>\delta_{2},\hskip 36.135 pt0\leq\delta_{2}\leq 1\] (17) \[\left[\frac{d_{t}}{d_{b}}\right]=1\] (18) where \(h_{d}(c_{k})\) and \(h_{d}(n_{k})\) are the height difference between current frame \(c_{k}\) and last frame \(n_{k}\) of the normal state. \(\theta\) is the slope of the major axis of the ellipse model and \(m,\;n\) are the line parameters of \(\tilde{L}(\theta)\) (line at \(\theta\)), estimated by the method of least squares with \(L_{fall}(\theta)\) (precomputed line to a fall at \(\theta\)) that was pre-calculated by pilot experiments. \(a\) and \(b\) are the major and minor axes, respectively. The notations \(d_{t},d_{b}\) are the depth values at the top and the bottom positions, respectively and \(\delta_{2}\) is the predefined threshold. If any of the conditions are not satisfied, either temporarily or permanently, it returns to the normal state. * No-motion phase: This phase is a condition that indicates the motionless period of the human after the fall state. To detect motion change in this phase, we use two gradient features, namely \(\
abla p_{t}(c_{k})\) and \(\
abla p_{c}(c_{k})\), they are the gradients at the top and center position. If these two gradient values satisfy Equation (19), it is initially classified as no-motion and if this condition is continuously satisfied over a period of \(\tau\) frames, the fall state is judged as an emergency state. \[\left\{ \begin{array}{l}\
abla p_{t}(c_{k})<\delta_{3}\\ \
abla p_{c}(c_{k})<\delta_{4}\end{array} \right. \tag{19}\]  
\[t_{monotion}>\tau \tag{20}\]  
where \(\tau\) is the threshold value that can be set arbitrarily according to the desired time. If the two gradient values are greater than threshold values \(\delta_{3}\) and \(\delta_{4}\), the fall state changes to the next state which is the recovery state.