# Image Analysis Using Human Body Geometry and Size Proportion Science for Action Classification
## 3 Proposed Solution
### Feature Extraction  
A segmented bounding box image (SI) obtained through the Segmentation Algorithm (SA) has both foreground (human blob) and background (black) pixels, we need to extract features from a human blob that would be used in classifying six human actions. SI is represented as \(SI=\{FP\cup BP\}\), where \(FP=\cup\{\forall(x_{p},y_{q}):SI(x_{p},y_{q})\) is foreground\(\}\) and  
\(BP=\cup\{\forall(x_{r},y_{s}):SI(x_{r},y_{s})\) is background\(\}\). To deal with the human actions under the presented study, geometrical positions of the hands and feet are quite important. The graphical representation of geometrical features from the human blob is shown in Figure 3. In the case of a hand wave, the position of the hand is important, while, in the case of straight standing or walking step, the position of feet is important. These positions may be represented as discriminant features, but they need to be calculated with some reference point. We have defined the centroid of the human blob as a reference point for calculating the feature set. Centroid of the Human blob, \((X_{cb},Y_{cb})\) is calculated using: \(X_{cb}=\frac{1}{m}\Sigma_{i=1}^{m}x_{i}\) and \(Y_{cb}=\frac{1}{n}\Sigma_{j=1}^{n}y_{j}\), where \(x_{i}\) and \(y_{j}\) represent pixel positions in FP. Boundary points of HB are extracted through finding the pixels \(p_{j}\) such that \(p_{j}\in FP\) and in its 8-neighborhood at least one of the neighbor \(n_{p}\in BP\). A boundary vector BV is created and all the boundary points are added to it. To obtain salient features, we divided the boundary vector (BV) of HB into four regions keeping the centroid of the HB as a reference point i.e., Top Left (TL), Top Right (TR), Bottom Left (BL), and Bottom Right (BR). The features for each of the actions are shown in Figure 4.  
The idea behind dividing the HB into four regions lies in the physical positions of both the hands and feet i.e., hands are in the upper half region of HB, while the feet position of HB is in its lower half. In each of the four regions, the farthest points from the centroid are calculated as:  
\[MDP_{K}\ =\ \max\left\{d_{p}=\sqrt{x_{p}-x_{c})^{2}+(y_{p}-y_{c})^{2}))}\ :\ \forall p\ \in\ K\right\},\text{where}\ K\ \in\ \{TL,TR,BL,BR\}. \tag{1}\]  
The position of the farthest distant points in each region is an important clue in the recognition of human actions under study. Along with the position of the calculated point, the angular position of the point about the centroid of the HB is equally useful as well. Drawing a line from the distant point to the centroid would help in calculating the angular position of points i.e., angles, \(\Theta_{K}\), of each farther distant point with reference to centroid i.e.,  
\[\Theta_{K}=\tan^{-1}\frac{(MDP_{K}(y)-y_{c})}{(MDP_{K}(x)-x_{c})} \tag{2}\]  
It may be observed from Figure 4a-f that, for each of the six actions, distances between TL, TR, and BL, BR gives better clues for recognizing them. From Figure 4a, it is evident that the distance \(D_{TLR}\) is not high as TL and TR are close to head area, while from the Figure 4b it may be inspected that there is a considerable value for \(D_{TLR}\) as the position of the right stretched hand is farther from the position of the head point, calculated as TR. The same can be established from Figure 4c-f. Distance between farthest points in the top and bottom regions are calculated using Euclidean distance as:  
\[D_{TLR}=\left|MDP_{TL}-MDP_{TR}\right|=\sqrt{(MDP_{TL}(x)-MDP_{TR}(x))^{2}+(MDP _{TL}(y)-MDP_{TR}(y))^{2}} \tag{3}\]  
\[D_{BLR}=\left|MDP_{BL}-MDP_{BR}\right|=\sqrt{(MDP_{BL}(x)-MDP_{BR}(x))^{2}+(MDP _{BL}(y)-MDP_{BR}(y))^{2}} \tag{4}\]  
It is to be noted that feet are at the largest distance from the centroid of the body in the lower body region. \(D_{BLR}\) represents the distance between the extreme points in the lower part of the body i.e., the distance between feet. This distance gives a clue about whether the human under study is in standing or walking position.