# Grassmann Manifold Based State Analysis Method of Traffic Surveillance Video
## 3 The Proposed Method  
TSV data feature extraction and spatial mapping process are shown in Figure 1. When processing the raw data of TSV, the feature extraction in the European space will affect the effect because of the inaccurate operation, so the features extracted in the European space are irregularly distributed, which is not conducive to the subsequent processing. In order to solve the problem of inaccurate calculation of data in European space, we map the data of European space to the Grassmann manifold space. Since the operation is more accurate in the Grassmann manifold space, the extracted feature distribution is very regular. After the feature extraction and spatial mapping processing based on Grassmann Manifold, in order to express the spatio-temporal correlation of traffic information, we input the features in the Grassmann manifold space into the neural network. Through the three-layer neural network, the extracted features are classified according to three states: \"light\", \"medium\" and \"heavy\". Finally, the traffic status is obtained, as shown in Figure 1.  
Neural networks couple many single neurons together, so that an output is inputted to another neuron. The sketch map of the neural network architecture is shown in Figure 2.  
The leftmost layer in neural network is called the input layer, the rightmost one is called the output layer, and the superscript +1 circle is called the bias node, which is intercept. The network layer between the input layer and the output layer is called the hidden layer, since we do not concentrate on the values of the middle layer when training sample observations. At the same time, we can see that the above neural network has three input units (not counting the bias unit), two hidden layers (eachwith three units) and three output units. In our experiments, the input layer is traffic video feature matrix which is extracted by Grassmann manifold, and then through the appropriate training and classification rules, traffic state eventually is divided into \"heavy\", \"medium\" and \"light\". These traffic states mean that the neural network has three outputs. We use \(n_{l}\) to represent the layers of the network. The \(l\)th layer is recorded as \(L_{l}\), and the input layer is \(L_{1}\) and the output layer is \(L_{n_{l}}\). There is \((W,b)=(W^{(1)},b^{(1)},W^{(2)},b^{(2)})\) as parameters in the above neural network, \(W^{(l)}_{i,j}\) is the connection parameter between unit \(j\) in layer \(l\) and unit \(i\) in layer \(l+1\). \(b^{(l)}_{i}\) is offset term of unit \(i\) in layer \(l+1\). \(s_{l}\) is used to represent the number of nodes in layer \(l\) (not counting the bias unit). \(a^{(l)}_{i}\) is used to represent the activation value (output value) of unit \(i\) in layer \(l\). \(a^{(l)}_{i}=x_{i}\) while \(l=1\), means the \(i\) th input value (the \(i\)th feature of the input value). For a given set of parameters \(W\), \(b\), we can calculate the output according to \(h_{W,b}(x)\) through neural network. Neural network computation steps in Figure 2 are obtained as follows. \[a^{(2)}_{1} =f(W^{(1)}_{1,1}x_{1}+W^{(1)}_{1,2}x_{2}+W^{(1)}_{1,3}x_{3}+b^{(1)} _{1}) \tag{5}\] \[a^{(2)}_{2} =f(W^{(1)}_{2,1}x_{1}+W^{(1)}_{2,2}x_{2}+W^{(1)}_{2,3}x_{3}+b^{(1 )}_{2})\] (6) \[a^{(2)}_{3} =f(W^{(1)}_{3,1}x_{1}+W^{(1)}_{3,2}x_{2}+W^{(1)}_{3,3}x_{3}+b^{(1 )}_{3})\] (7) \[h_{W,b} =a^{(3)}_{1}=f(W^{(2)}_{1,1}x_{1}+W^{(2)}_{1,2}x_{2}+W^{(2)}_{1,3} x_{3}+b^{(2)}_{1}) \tag{8}\]  
\(z^{(l)}_{i}\) is used to represent the weighted sum of input for unit \(i\) in layer \(l\) (counting the bias unit). \[z^{l}_{i}=\sum_{i=1}^{n}W^{(l-1)}_{i,j}x_{j}+b^{(l-1)}_{i} \tag{9}\]  
So  
\[a^{(l)}_{i}=f(z^{(l)}_{i}) \tag{10}\]  
Then we expand the activation function \(f(\cdot)\) to vectors, which means \(f([z_{1},z_{2},z_{3}])=[f(z_{1}),f(z_{2}),f(z_{3})]\). Therefore, the above equations can be more succinctly expressed as follows. \[z^{(2)} =W^{(1)}x+b^{(1)} \tag{11}\] Figure 1.0 (12) Figure 1.1 (13) Figure 1.2  
Figure 1.3 The sketch map of the neural network architecture.