Computer Vision Techniques for Crowd Density and Motion Direction Analysis