## 3 Tightly Coupled RGB Time Tensor Network
### Pose-Transition Feature to Image Encoding Technique
#### 3.2.2 Behavior Image Generation (RGB Color Encoding)
In addition, _S(Skel(f))_ can be represented in the following matrix form:  
\[S(Skel(f))=\left( \begin{array}{ccc}x_{0}(0)y_{0}(0)z_{0}(0)&\cdots&x_{N}(0)y_ {N}(0)z_{N}(0)\\ \vdots&\ddots&\vdots\\ x_{0}(F)y_{0}(F)z_{0}(F)&\cdots&x_{N}(F)y_{N}(F)z_{N}(F)\end{array} \right)\]  
The joint position values of each joint of _S(Skel(f))_ are extracted by dividing into \(x_{n}(f),\ y_{n}(f),\ z_{n}(f)\), and the extracted \(x_{n}(f),\ y_{n}(f),\ z_{n}(f)\) are put into \(X\), \(Y\), and \(Z\) in a list form again. Here, _S(Skel(f))_ is redefined as _S(Skel(f))_ = [\(X\), \(Y\), \(Z\)], where \(X\), \(Y\), and \(Z\) have the following tensor matrixes:  
\[X=\left( \begin{array}{ccc}x_{0}(0),x_{1}(0)&\cdots&x_{N-1}(0),x_{N}(0)\\ \vdots&\ddots&\vdots\\ x_{0}(F),x_{1}(F)&\cdots&x_{N-1}(F),x_{N}(F)\end{array} \right)\]  
\[Y=\left( \begin{array}{ccc}y_{0}(0),y_{1}(1)&\cdots&y_{N-1}(0),y_{N}(0)\\ \vdots&\ddots&\vdots\\ y_{0}(F),y_{1}(F)&\cdots&y_{N-1}(F),y_{N}(F)\end{array} \right)\]  
\[Z=\left( \begin{array}{ccc}z_{0}(0),z_{1}(1)&\cdots&z_{N-1}(0),z_{N}(0)\\ \vdots&\ddots&\vdots\\ z_{0}(F),z_{1}(F)&\cdots&z_{N-1}(F),z_{N}(F)\end{array} \right)\]  
Furthermore, to prevent the effect of large-scale features becoming too big, all values of _S(Skel(f))_ are normalized to the values of [0, 1] through Equation (2):  
\[\left\{ \begin{array}{l}X_{norm}=\frac{x_{n}(f)-X_{min}}{X_{max}-X_{min}}\\ Y_{norm}=\frac{y_{n}(f)-Y_{min}}{Y_{max}-Y_{min}}\\ Z_{norm}=\frac{z_{n}(f)-Z_{min}}{Z_{max}-Z_{min}}\end{array} \right. \tag{2}\]  
_Step 2. Tensor mapping on RGB channels (Lines 9-11)._ To map \(x_{n}(f),y_{n}(f),z_{n}(f)\) to the RGB channels (red, green, and blue, respectively), _Red channel_ : \(r_{n}(f)\), _Green channel_ : \(g_{n}(f)\), _Blue channel_ : \(b_{n}(f)\) that correspond to the channels, are respectively calculated, as shown in Equation (3):  
\[\left\{ \begin{array}{l}r_{n}(f)=\left\|255*x_{n}(f)\right\|\\ b_{n}(f)=\left\|255*z_{n}(f)\right\|\\ g_{n}(f)=\left\|255*y_{n}(f)\right\|\end{array} \right. \tag{3}\]  
The minimum and maximum of each tensor row \(X\), \(Y\), and \(Z\) are min (\(X\)), min (\(Y  
\[B=\left( \begin{array}{ccc}b_{0}(0),b_{1}(1)&\cdots&b_{N-1}(0),b_{N}(0)\\ \vdots&\ddots&\vdots\\ b_{0}(30),b_{1}(30)&\cdots&b_{N-1}(30),b_{N}(30)\end{array} \right)\]  
_Step 3. RGB tensor fusion and image generation (Lines 12-18)._ By fusing the \(R\), \(G\), and \(B\) tensor matrices mapped to the channels, respectively, through Step 2, one \(pixRGB\) is generated. One \(pixRGB\) represents one joint in color, as shown in Equation (4). Here, \(n=0,1,\ldots,N,f=0,1,2,\ldots,F\), and \(pixRGB(r_{n},g_{n},b_{n})\in[0,\,255]^{3}\). \[pixRGB=\left(r_{n}(f),\;g_{n}(f),\;b_{n}(f)\right)^{3} \tag{4}\]  
Finally, 24-bit \(pixRGB\) are gathered to generate an \(imgRGB\) of 20 (total number of joints) \(\times\) 30 (total number of frames). One RGB color image, \(imgRGB\), is represented by the following 3D tensor matrix. Here, \(F\) means 30 fps. \[imgRGB=\left( \begin{array}{ccc}pixRGB_{0}(0),\;pixRGB_{1}(0)&\cdots&pixRGB _{N-1}(0),\;pixRGB_{N}(0)\\ pixRGB_{0}(1),\;pixRGB_{1}(1)&\ddots&pixRGB_{N-1}(1),\;pixRGB_{N}(1)\\ \vdots&&\vdots\\ pixRGB_{0}(F),\;pixRGB_{1}(F)&\cdots&pixRGB_{N-1}(F),\;pixRGB_{N}(F)\end{array} \right)\]