# Human Activity Recognition by the Image Type Encoding Method of 3-Axial Sensor Data
## 3 Image Type Encoding Method of the 3-Axial Sensor Data
### 2 Step SBIDP Enhancement Method  
The \(SBIDP\) generated through image encoding of raw sensor data expresses physical activity characteristics as spatially diverse brightness, patterns, and shapes, as shown in Figure 6. Figure 6 shows the change in the continuous \(BIDP\) images for three physical activity data points according to the change in \(T\). Labels 3, 7, and 17 have overall strong brightness and take the form of vertical grid patterns, but their detailed characteristics differ, as seen in their magnifications in Figure 5. In addition, while the physical activity performed in label 3 of Figure 6 remains the same, the vertical pattern gradually becomes stronger over time. However, the detailed pattern of label 3 in Figure 5 does not change. Similar results were obtained for physical activity in labels 7 and 17. They exhibited stronger grid patterns compared to label 3, as illustrated in Figure 5, which shows the varying levels of brightness in different areas upon magnification. However, utilizing these robust grid pattern features without any modifications as input for training a neural network model may negatively impact its ability to accurately recognize physical activities.  
Therefore, in this study, to transform the detailed characteristics of the grid pattern into one large pattern, component values of the raw accelerometer sensor value matrix \(A[\cdot]\) and of the gyroscopic sensor value matrix \(G[\cdot]\) were arranged to generate \(SBIDP\). This, as a primary pre-processing step for neural network input, generates \(BIDP_{E1}\) with strengthened spatial characteristic information. Figure 7 is an example of \(BIDP_{E1}\) generated using the arranged sensor data matrix, and as can be seen, there are clearer and more defined gradation spatial characteristics compared with the grid pattern of each label in Figure 6. However, due to varying brightness values, the resulting pattern took on a curved shape. The angular features of this curve were utilized to represent changes in physical activity data, and Equation (3) was employed to generate \(BIDP_{E2}\) with further improved spatial characteristics as a secondary step.  
\[BIDP_{E2}=\sum_{i=0}^{3}BIDP_{E1}\Big{(}\frac{\pi}{2}\times i\Big{)} \tag{3}\]  
where \(BDIP_{E1}(\theta)\ :\ \theta\ rotated\ BIDP_{E1}\).  
Figure 6: Examples of sequential \(SBIDP\).  
\(\sum\) in Equation (3) denotes the image sum (OR) operation, and it refers to the image OR of the arranged \(BIDP_{E1}\) rotated by \(90^{\circ}\), \(180^{\circ}\), and \(280^{\circ}\). Figure 8 illustrates the outcomes of \(BIDP_{E2}\) after the secondary enhancement of spatial characteristics, wherein label 3 is represented as an angled propeller and label 17 as a curved propeller. Figure 9 displays the resulting \(BIDP_{E2}\) for all 18 physical activities in the WISDM dataset.  
Figure 8: \(BIDP_{E2}\) examples of 2 nd enhanced \(BIDP_{E1}\).  
Figure 7: \(BIDP_{E1}\) examples of 1 st enhanced \(SBIDP\) by sorting elements of the \(A[\cdot]\) and \(G[\cdot]\) matrices.