Unsupervised Scene Analysis: A Hidden Markov Model Approach