# LiDAR-Based Dense Pedestrian Detection and Tracking
## 2 Methodology
### Dense Pedestrian Tracking
#### 2.4.1 State Estimation  
The walking of pedestrians on the ground can be modeled as a two-dimensional movement. The LiDAR scanning frequency is usually high. For Velodyne HDL-64E, its typical scanning frequency is 10 Hz, and pedestrian movement is relatively slow, thus pedestrian velocity can be seen as constant. During the LiDAR scan, the state of pedestrians can be modeled as \(X_{k}(x,y,v_{x},v_{y})\), where \((x,y)\) is the centroid and \((v_{x},v_{y})\) is the velocity. The pedestrian state transition is modeled as follows:  
\[X_{k|k-1}=FX_{k-1}+w_{k-1},\quad w_{k-1}\sim N(0,Q_{k-1}) \tag{14}\]  
\[F=\left[\begin{array}{cc}1&T\\ 0&1\end{array}\right]\otimes I_{2} \tag{15}\]  
\[Q_{k-1}=\sigma_{v}^{2}\left[\begin{array}{cc}\frac{T^{4}}{2}&\frac{T^{2}}{2} \\ \frac{T^{3}}{2}&T^{2}\end{array}\right]\otimes I_{2} \tag{16}\]  
where \(F\) is the transition matrix and \(w_{k-1}\) is the process noise which obeys Gaussian distribution with a covariance matrix \(Q_{k-1}\). \(T\) is the time interval and \(\sigma_{v}\) is the standard deviation of the process noise. \(I_{2}\) denotes the \(2\times 2\) identity matrix. \(\otimes\) means Kronecker tensor product. Note that many other appropriate models (e.g., discrete walking model [36], terrain-constrained model [37], and social force-based model [38]) also can be used here to represent the pedestrian behaviors in realistic applications.  
Each person within the LiDAR detection range will produce a set of measurements rather than a single point. Suppose \(y_{k}=\{y_{k}^{1},y_{k}^{2},\ldots,y_{k}^{n}\}\) is a set of LiDAR points originating from a person detected by using the method proposed in Section 2.3. As shown in (17), it is simple and effective to use the centroid of the set to represent the person.  
\[Y_{k}=\frac{1}{n}\sum_{i=1}^{n}y_{i} \tag{17}\]  
When a person is represented by its centroid, the observation model can be written as follows:  
\[\hat{Y}_{k}=HX_{k|k-1}+e_{k},\ \ e_{k}\sim N(0,R_{k}) \tag{18}\]  
\[H=\left[\begin{array}{cc}I_{2}&0_{2}\end{array}\right] \tag{19}\]  
\[R_{k}=\sigma_{e}^{2}I_{2} \tag{20}\]  
where \(H\) is the observation matrix, \(0_{2}\) denotes the \(2\times 2\) zero matrix, \(e_{k}\) is the observation noise which obeys Gaussian distribution with a covariance matrix \(R\) and \(\sigma_{e}\) is the standard deviation of the observation noise.  
The Kalman filter [39] is used to predict and update the pedestrian state in this paper. The prediction of the state and the state covariance can be obtained by  
\[X_{k|k-1}=FX_{k-1|k-1} \tag{21}\]  
\[P_{k|k-1}=FP_{k-1|k-1}F^{T}+Q \tag{22}\]  
where \(X_{k-1|k-1}\) and \(P_{k-1|k-1}\) are the target state and state covariance matrix at time \(k-1\), respectively. \(F\) is the state transition matrix and \(Q\) is the process noise covariance matrix. According to (21) and (22), we can gain the predicted state and the predicted state covariance matrix at time \(k\).  
After the data association, the centroid of each target can be regarded as observation \(Y_{k}(x,y)\). The pedestrian status will be updated by (23)-(25):  
\[K=\frac{P_{k|k-1}H^{T}}{\left(HP_{k|k-1}H^{T}+R\right)^{-1}} \tag{23}\]\[X_{k|k}=X_{k|k-1}+K(Y_{k}-HX_{k|k-1}) \tag{24}\]  
\[P_{k|k}=(I-KH)P_{k|k-1} \tag{25}\]  
where \(K\) is the Kalman filter gain and \(X_{k|k}\) and \(P_{k|k}\) are the updated state and its covariance matrix, respectively. Equations (21)-(25): constitute the complete Kalman filtering process.