Topological Modeling and Stochastic Analysis of Images