A computer-implemented method for matching a query image with a plurality of images, an image being represented by a set of feature points, orientations of the feature points, and a corresponding set of feature vectors, the method comprising: finding putatively corresponding images from the plurality of images by finding putative feature correspondences between the plurality of images and the query image, wherein an image is selected as a putatively corresponding image based at least in part on a number of putative feature correspondences between said image and the query image being greater than a predefined value, wherein a putative feature correspondence is a pair of feature points, one from the query image and one from an image of the plurality of images, which are associated with feature vectors that have a dot product greater than a predefined value; performing a topological equivalence test on one or more subsets of the putative feature correspondences between an image of the putatively corresponding images and the query image, wherein two sets of corresponding points are topologically equivalent if, given two lines, one through a pair of points in one set and the other through the corresponding points in the other set, the remaining corresponding points are on the same side of each line; and when a subset of putative feature correspondences passes the topological equivalence test, determining said image of the putatively corresponding images to be a candidate match by: performing motion estimation by computing a transformation between corresponding feature points in the subset of putative feature correspondences; and performing an orientation consistency test on the feature points in the subset of putative feature correspondences, to determine a validity of the transformation. finding putatively corresponding images from the plurality of images by finding putative feature correspondences between the plurality of images and the query image, wherein an image is selected as a putatively corresponding image based at least in part on a number of putative feature correspondences between said image and the query image being greater than a predefined value, wherein a putative feature correspondence is a pair of feature points, one from the query image and one from an image of the plurality of images, which are associated with feature vectors that have a dot product greater than a predefined value; performing a topological equivalence test on one or more subsets of the putative feature correspondences between an image of the putatively corresponding images and the query image, wherein two sets of corresponding points are topologically equivalent if, given two lines, one through a pair of points in one set and the other through the corresponding points in the other set, the remaining corresponding points are on the same side of each line; and when a subset of putative feature correspondences passes the topological equivalence test, determining said image of the putatively corresponding images to be a candidate match by: performing motion estimation by computing a transformation between corresponding feature points in the subset of putative feature correspondences; and performing an orientation consistency test on the feature points in the subset of putative feature correspondences, to determine a validity of the transformation. <EOS>