  The precise assessment of speed-space time delay (TD) facilitates the
differentiation between pedestrian anticipation behavior and reaction behavior.
Importantly, the TD scale is instrumental in the evaluation of potential
collision risks inherent in the crowd, thereby offering crucial quantitative
metrics for crowd risk. This article introduces the CosIn algorithm for
evaluate TD during pedestrian motion, comprising the CosIn-1 and CosIn-2
algorithms. The CosIn-1 algorithm specifically addresses the precise
computation issue associated with the TD of individual pedestrians, while the
CosIn-2 algorithm is employed for assessing TD at a crowd scale, concurrently
addressing the imperative of real-time computation. Efficacy analyses of the
CosIn-1 and CosIn-2 algorithms are conducted using the data from single-file
pedestrian experiments and crowd cross experiments, respectively. The results
obtained demonstrate commendable precision in the algorithmic solutions. This
algorithm contributes to the precise assessment of behavior patterns and
collision risk within crowd dynamics.
