Automatic Detection and Computer Vision Analysis of Flow Dynamics and Social Groups in Pedestrian Crowds