Generative methods for scene association with 2D pairwise constraints