Motion Flow Segmentation Based on Optical Flow Angle

Kun Yang, Lin Wang, Fujian Feng, Jiang-Hao Yu, Yuan-Fei Cheng2017

Abstract

Traditional deep motion state analysis often treats moving foregrounds in dense crowd scenes as a single entity, which can lead to inaccuracies in density estimation and behavior understanding. This paper proposes a novel algorithm to segment motion flow based on optical flow angle. The approach utilizes the finite-time Lyapunov exponent (FTLE) for foreground extraction, followed by foreground optical flow calculation and dynamic K-means clustering of the flow angles. Experimental results demonstrate that this method accurately segments motion flows across diverse scenes.

Introduction: The Challenge of Dense Crowds

In environments like marathons, protests, or busy transit hubs, computer vision systems often struggle to differentiate between groups of people moving in different directions. Treating the entire moving foreground as a single "blob" is insufficient for high-level tasks like safety monitoring or tracking.

A typical dense crowd scene where multiple distinct motion trajectories intersect, making simple foreground analysis difficult.

When a crowd contains individuals moving in opposing directions, standard background subtraction or velocity-based checks fail to distinguish these groups. The primary challenge is that people in dense crowds often overlap and move at similar speeds, necessitating a more granular approach to segmentation.

Methodology

The proposed pipeline consists of three main stages:

1. Foreground Extraction via FTLE

Rather than simple background subtraction, the authors employ the Finite-Time Lyapunov Exponent (FTLE). Borrowed from fluid dynamics, FTLE identifies "Lagrangian Coherent Structures" (LCS)—the boundaries or "ridges" where motion patterns diverge. This allows for robust isolation of the moving crowd from the static background.

2. Optical Flow Angle Calculation

After masking the foreground, the system calculates the global optical flow. The innovation lies in prioritizing the angle (direction) of the flow over its magnitude (speed). In a dense crowd, individuals moving in opposite directions may have identical speeds but will have angles $180^\circ$ apart, making the angle a superior discriminator.

Visualization of the optical flow vector field, which serves as the basis for angle-based clustering.

3. Dynamic K-means Clustering

Because the number of motion flows in a scene is unpredictable, the authors use a Dynamic K-means approach. The algorithm initializes with four cardinal directions and iteratively merges or discards clusters based on intra-class and inter-class thresholds until the optimal number of distinct motion flows is identified.

Key Insights

  • Direction Over Speed: Clustering by angle effectively separates groups that might otherwise be merged if only speed were considered.
  • Crowds as Fluids: Treating the crowd as a continuous fluid via FTLE is highly effective when individual body parts are obscured by density.
  • Self-Adjusting Parameters: The dynamic thresholding allows the system to adapt to various scenes without manual tuning.

Results and Performance

The algorithm was evaluated using the UCF Crowd Dataset. Compared to S. Ali’s particle dynamics baseline, the proposed method showed significant improvements:

  • Error Reduction: In test scenes, the average segmentation error was reduced from 20.5% to 15.2%.
  • Qualitative Accuracy: The method successfully identified three distinct motion types (horizontal right, vertical upward, and vertical downward) in complex scenes where the baseline failed to differentiate them.

Conclusion and Future Work

While the algorithm provides a clear path toward more accurate crowd monitoring, future work is needed to address computational complexity and performance in extremely static or jittery crowds. Integrating this segmentation into higher-level AI for predicting congestion or stampedes remains a key objective for intelligent monitoring systems.

Summary updated

BibTeX
@misc{yang2017motion,
  author = {Kun Yang and Lin Wang and Fujian Feng and Jiang-Hao Yu and Yuan-Fei Cheng},
  title = {{Motion Flow Segmentation Based on Optical Flow Angle}},
  year = {2017},
  doi = {10.2991/icwcsn-16.2017.120},
}
Figure