# Efficient Crowd Anomaly Detection Using Sparse Feature Tracking and Neural Network
## 3 Materials and Methods
### Crowd Representation and Behaviour Descriptors
#### 3.1.4 Visual Descriptors
In this study, we employ a set of five interactive descriptors, three of which capture spatiotemporal information, while the remaining two specifically target spatial properties. These descriptors draw inspiration from [14] but have unique formulations as they incorporate the local crowd representation as a fundamental element in their computation. The descriptors used in this analysis include stability, collectiveness, conflict, local density, and uniformity. They are computed locally, enabling a detailed examination of the crowd characteristics and offering valuable insights for crowd analysis. * Stability The concept of stability, as defined in [14], captures the degree of consistency in the topological structure of a crowd over time. It measures the tendency of individuals in a crowd to maintain their proximity to the same set of neighbours as time progresses. By assessing the stability property, valuable insights can be gained into the persistent patterns and relationships within the crowd, providing a deeper understanding of its dynamics and behaviour. This characteristic is established by drawing a parallel between a Delaunay graph's topological structure and a crowd's evolving structure. To be more precise, the stability of a graph \(g^{k}\) at time \(k\) is calculated [37] via its graphical distance to the corresponding graph \(g^{k-\gamma_{2}}\) at time \(k-\gamma_{2}\), where \(\gamma_{2}\) represents the interval used to fragment the trajectory for the computation of the \(D^{var}\) descriptor, as defined in Equation (7). In order to establish temporal matching between cliques, the proposed graphical distance utilises the temporal aspect of the model of the tracklets and is locally computed for each vertex. The stability of a given vertex \(V_{i}^{k}\) is calculated as the strain between the two adjacent cliques \(C_{n}\left(V_{i}^{k}\right)\) and \(C_{n}\left(V_{i}^{k-\gamma_{2}}\right)\), computed as in the following Equation (10):  
\[D^{stab}\left(V_{i}^{k}\right)=\text{dist}_{g}\left(C_{n}\left(V_{i}^{k}\right),C_{n}\left(V_{i}^{k-\gamma_{2}}\right)\right) \tag{10}\]  
Each clique is represented by a set of clockwise-oriented triangles, and this is used to define the graphical distance between two cliques \(C_{n}\left(V_{i}^{k}\right)\) and \(C_{n}\left(V_{i}^{k-\gamma_{2}}\right)\), represented by Equation (11):  
\[ \begin{split}\text{dist}_{g}\left(C_{n}\left(V_{i}^{t_{1}} \right),C_{n}\left(V_{i}^{t_{2}}\right)\right)&=\frac{1}{\left| C_{n}\left(V_{i}^{t_{1}}\right)\right|}\\ &\cdot\sum_{r_{i_{\alpha_{1}}}\in R_{n}\left(V_{i}^{t_{1}}\right) r_{i_{\beta}}\in R_{n}\left(V_{i}^{t_{2}}\right)}g\left(r_{i_{\alpha_{1}}},r_{i_{ \beta_{1}}}\right)\\ &+\sum_{r_{i_{\alpha_{2}}}\in R_{n}\left(V_{i}^{t_{1}}\right)} \min_{r_{i_{\beta_{2}}}\in R_{n}\left(V_{i}^{t_{2}}\right)}g\left(r_{i_{\alpha _{2}}},r_{i_{\beta_{2}}}\right)\end{split}  \tag{11}\]  
The term \(\left(C_{n}\left(V_{i}^{t_{1}}\right)\right)\) pertains to the quantity of neighbours within the clique. The computation is carried out in two steps, as currently formulated. Initially, we determine the dissimilarity between the triangles that are matched and indexed as \(i\alpha_{1}\) and \(i\beta_{1}\). For the remaining triangles on both sides, where no matching is achieved through tracklets, we estimate the distance by selecting the most similar triangle as a potential corresponding candidate. The function \(g(\cdot)\) denotes the measure of the distance between triangles, which is mathematically defined as the discrepancy in the cross ratio, taking into account the relative size of each triangle. \[g\left(r_{i\alpha},r_{i\beta}\right)=\left\|a_{i\alpha}-a_{i\beta}\right\| \cdot\left\|c_{i\alpha}-c_{i\beta}\right\| \tag{12}\]  
where \(a_{i\alpha}\) and \(c_{i\alpha}\) in Equation (12) are the area and the cross ratio of a triangle indexed by \(i\alpha\).