Probabilistic context neighborhood model for two-dimensional lattices