Automatic Analysis of Crowd Dynamics Using Computer Vision and Machine Learning Approaches