# An Image-Based Fall Detection System for the Elderly
## 4 Methodology
### Object Detection and Person Tracking  
The purpose of object detection and tracking is to identify people in a given video and track their movement. For this, IFADS first utilizes YOLOv3 [36] to detect the person, the chair, and the bench, and then uses the object tracking method continuously adaptive mean shift (Camshift) to track the person continuously. The notations and definitions used in the paper are shown in Table 1. Algorithm 1 shows the steps for object detection. First, IFADS extracts a frame \(F\) from a video stream. Second, since the YOLO network downsamples the input by 32, we fill the image size of \(F\) to a multiple of 32. Third, we load the model parameter of YOLOv3 to detect the object. Fourth, the bounding box \(O_{i}\) is the result that is detected by the YOLO detector. Finally, for a box \(O_{i}\), if it detects \(O_{i}\) as the chair or the bench, it names it \(C_{i}\). If it detects \(O_{i}\) as the bench, for a bench with no seatback, we consider that the height of the bench is twice that of a bench with a seatback. Conversely, if IFADS detects \(O_{i}\) as the person, it names it \(P_{i}\). However, people may be obscured by the chair or the bench when they are walking around. Since the location of the chair or bench in a public area, such as a park or a courtyard, is stable, we set the position and the size of the chair or bench. Since there are usually many people in public areas, we use the object tracking method called Camshift to track the person in \(P_{i}\). Figure 1: System architecture of the Image-based FAIL Detection System (IFADS). For person tracking, we use Camshift to track the person and ensure that he/she still appears in the next frame. Algorithm 2 shows the steps of person tracking. First, we convert the latest frame \(F^{\prime}\) from the [PERSON], Green and Blue (RGB) color space to the Hue-Saturation-Value (HSV) color space and then extract the hue histogram in the HSV color space. The obtained image is called \(H\), the hue histogram of \(F^{\prime}\). Next, we extract a specific hue histogram \(P_{i,fid-1}{}^{H}\) in each area of \(P_{i,fid-1}\) in \(H\). We then use the Back Projection function in Open Source Computer Vision (OpenCV) [37] to obtain the back projection of each \(P_{i,fid-1}{}^{H}\) in H; then, we can find similar features in the image. To reduce the noise, we enhance the back projection images and the human reigns. For this, we convert the back projection images into a binary scale and perform the Erosion and Dilation OpenCV function. The obtained binary back projection images are called \(B_{i}\). Then, we take \(P_{i,fid-1}\) and \(B_{i}\) as input to perform Camshift, which is a widely used object tracking method. The main idea of mean shift is as follows: given a tracking window that contains a set of points, such as back projection images, mean shift will move the tracking window that contains the most points. The obtained bounding box of person tracking is \(\overline{P}_{i}\). If the center of \(\overline{P}_{i}\) is in the bounding box of that person \(P_{i}\), then we ensure that the person still appears in the frame. If it cannot find the person, then it executes fall detection.