Crowd motion detection and analysis