# Anthropometric Ratios for Lower-Body Detection Based on Deep Learning and Traditional Methods
## 3 Materials and Methods
### Traditional Methods
#### 3.1.1 Viola-Jones Algorithm (VJ)  
The VJ algorithm [12; 38] extracts simple features based on the notion of cascaded classifiers. Some instances of contrast detection are performed in cells in specific locations in an image, such as the human eye. The VJ algorithm solves the complex learning problem by using an enormous number of positive and negative training images together with a cascade of simple classifiers. The corresponding process is summarized in Figure 3.  
As shown in Figure 3, the first step of the VJ Algorithm 1 for face detection is to convert the input image into a greyscale image. Next, the integral image representation is rapidly generated by calculating the value at pixel \((x,y)\) as the sum of the pixels above and to the left of \((x,y)\). Then, the sum of the values of all pixels in rectangle D, as shown in Figure 4, can be computed as \(4+1-(2+3)\). Subsequently, the entire image is scanned to calculate Haar-like features by subtracting the sum of the pixels under white rectangles from the sum of the pixels under black rectangles in patterns similar to those shown in Figure 5. Adaptive boosting (AdaBoost) is then used as a machine learning algorithm to find the best such rectangle features among the approximately 160,000 possible features in a window of \(24\times 24\) pixels in order to construct a linear combination of corresponding classifiers. In the final phase of the VJ algorithm, the input image is fed into these cascaded classifiers; if the input image passes all stages of the classifier cascade, the input image is identified as a human face image, whereas if the image does not pass any stages, it is not a human face image, as shown in Figure 6.  
Figure 2: Detailed framework for lower-body detection using the proposed anthropometric ratios. Figure 4: The summation of the pixels can be computed with four reference location. Figure 5: The example of rectangle images of Haar-like features. Figure 3: Viola-Jones algorithm. ```
Data:\(P\) of the image is more than zero Result: Result of face detection
1 Convert color image to gray image; while\(N_{scale}>0\)do
2 Down-sample image by one scale; Compute integral image for current scale; while\(N_{sliding}>0\)do
3 while\(N_{cascade}>0\)do
4 while\(N_{filter}>0\)do
5 Filter the detection window;
6 Accumulate filter outputs within this stage; ifaccumulation fails to pass per-stage thresholdthen
7 Reject this window as a face; Break the while loop;
8 ifthis detection window passes all \(N_{cascade}\) of thresholdsthen
9 Accept this window as a face;
10 else
11 Reject this window as a face;
12
13
14
15
16
17 where \(P\) is the pixel sizes of an image size, \(N_{scale}\) is the number of scales in image pyramid, \(N_{sliding}\) is the number of the sliding detection window, \(N_{cascade}\) is the number of stage in the cascade classifier, and \(N_{filter}\) is the number of filter in the stage. #### 3.1.2 Support Vector Machine Classification Based on Histograms of Oriented Gradients (HOG-SVM)

[PERSON] and [PERSON] [11] proposed the HOG method for human detection, as demonstrated in Figure 7. In this method, the HOG features of both positive images (human images) and negative images (non-human images) are extracted and used to fine-tune a pre-trained linear SVM classifier for human detection. The overall process of HOG-SVM detection is summarized in Figure 8.

Figure 6: The cascade classifier for face detection. The HOG-SVM algorithm for human detection is presented in Algorithm 2. The HOG-SVM process is initialized with configuration parameters such as the sizes of cells, blocks, and bins of a sliding window. The image is then converted to greyscale. The sliding window is calculated as the HOG feature for whole the image. For the sliding window, the gradients on the \(x\)-axis and \(y\)-axis are calculated using Equations (1) and (2), and the edge angles are computed using Equation (3). Figure 5.0

where \(G_{x}(x,y)\) is the gradients of \(x\)-axis and \(f(x,y)\) is the pixel value of gray scale image at \((x,y)\) coordinates.