Text this: A probabilistic graphical model approach to solving the structure and motion problem