On Modeling and Analyzing Crowds From Videos