1. A method comprising: receiving a query image of a scene captured with a camera; receiving a plurality of reference images of the scene from a database, each reference image having an associated position estimate; generating direction vectors describing directions between an unknown position of a camera center for the query image and a reference camera center for each reference image based on the query image and the plurality of reference images; and using the direction vectors and the associated position estimate for each reference image to determine a pose of the camera with six-degrees of freedom.