The concepts used to process the video images, such the implemented fall detection algorithm capable of effectively detecting falls, are described fully in this section. The processing involved background subtraction algorithms to detect moving per- sons or bodies from the recorded scene. This enables the silhouette of the moving body to be extracted from the video being recorded. This extraction was achieved by subtracting the background estimation model from the current input video. By retrieving the person’s silhouette from this input video, certain key features of the person can be obtained for the following fall detection stage (Section 4.3). The
CHAPTER 4. MATHEMATICAL CONCEPTS
under two main categories, including recursive and non-recursive background mod- elling methods.
One of the non-recursive methods is the frame differencing technique. In this type of modelling, the frame differencing method takes into consideration the frame at previous time (t-1 ) as the background model. The moving object image is obtained by subtracting it from the previous image shown in Eq. 4.2.1
∣𝐼𝑡− 𝐼𝑡−1∣ > 𝑇 (4.2.1)
In Eq. 4.2.1, the variable 𝐼𝑡 is the intensity of the image frame at time t, 𝐼𝑡−1
is the intensity of the image frame at time (t-1 ) and T is a threshold value (the threshold value is an arbitrary value measured in number of pixels to ensure that a satisfied and reliable foreground is obtained from the background).
The next non-recursive method is termed the median filtering technique, in which the background value for each pixel is calculated as the median of that pixel for all frames found in the buffer, which eventually requires a fair amount of memory given by the following formula [29].
Memory size = 𝑁 × framesize (4.2.2) In contrast to those methods, the running average method is a recursive method which employs a fast modelling algorithm and does not require a large amount of memory. The computation of such algorithm is summarised in Eq. 4.2.3.
CHAPTER 4. MATHEMATICAL CONCEPTS
In Eq. 4.2.3, the variable B is the background and 𝐶𝑖 is the current frame of the
video input while the variable represents the learning rate 𝛼, which is taken as 0.05. The approximated median filtering technique was used for image processing of the video input, which is described in detail in the following subsection 4.2.1.
4.2.1
Approximated median filtering technique
In this algorithm, when the pixel in the current frame of the video input has a greyscale value greater than that of the pixel in the background, the pixel value in the estimate increases by one. However, when the pixel value in the current frame of the video input has a value lower than the pixel value of the estimated background, the pixel in this background estimate decreases by one.
When the approximated median filtering method is applied to the background model, it converges to an estimate in which 50 percent of input pixels are greater than the background model, while the remaining percentage of the input pixels are less than this background model. The approximate median filtering is described by following a series of equations where I represents the individual frame, while B and F are the background and foreground respectively. Firstly, the algorithm sets the background to the first frame and then resets the foreground to all zeroes.
𝐵𝑖𝑗(0) = 𝐼𝑖𝑗(0) (4.2.4)
𝐹𝑖𝑗(0) = 0 (4.2.5)
For each time t seconds, D is defined as
CHAPTER 4. MATHEMATICAL CONCEPTS
A pixel is regarded as foreground if the difference is more than a specified thresh- old; otherwise it is considered as background. Initially, the background is taken as the first frame at time t = 0, and then it is updated at each frame so that it slowly adapts to the frame.
𝐹𝑖𝑗(𝑡) = 𝐼𝑖𝑗(𝑡) if ∣𝐷𝑖𝑗(𝑡)∣ ≥ Δ (4.2.7)
𝐹𝑖𝑗(𝑡) = 0 if ∣𝐷𝑖𝑗(𝑡)∣ < Δ (4.2.8)
(The delta symbol Δ represents the threshold value) The background pixel is increased by one when the current pixel is higher, whereas the background pixel is decreased by one when the current pixel is lower.
𝐵𝑖𝑗(𝑡) = 𝐵𝑖𝑗(𝑡 − 1) + 1 if 𝐷𝑖𝑗(𝑡) > 0 (4.2.9)
𝐵𝑖𝑗(𝑡) = 𝐵𝑖𝑗(𝑡 − 1) − 1 if 𝐷𝑖𝑗(𝑡) < 0 (4.2.10)
4.2.2
Mixture of Gaussians technique
In this research, the mixture of Gaussians background modelling was also imple- mented to examine its performance. In this type of modelling, each pixel of the image is modelled through a number of Gaussian distributions that represent a function distribution F as shown in Eq. 4.3.3. The formula for this algorithm is given below: 𝐹 (𝑖, 𝜇, 𝜎) = 𝑛 ∑ 𝑖=1 𝑤𝑖,𝑡× 𝜂(𝜇, 𝜎) (4.2.11)
Where 𝜂 is a Gaussain probability density function. In Eq. 4.2.11, the average of each Gaussian from 1 to k are termed components. This is an estimation of the
CHAPTER 4. MATHEMATICAL CONCEPTS
pixel for the next frame. The weight w and the standard deviation represent the amount of confidence in the estimation. A comparison between the input pixel and the means of the Gaussians tracking that pixel should be performed. The absolute difference between the input pixel and the mean of the Gaussian should be less than the standard deviation of the component which is scaled by a factor D as shown in Eq. 4.2.12. If this is the case, the pixel is regarded as part of the background; if not, it is classified as foreground.
∣𝑖𝑡− 𝜇𝑖,𝑡−1∣ ≤ 𝑜𝑟 ≤ 𝐷𝜎 (4.2.12)
After each frame, the component variables w, and needs to be updated [28].