A method for comparing a first image with a second image, comprising: - identifying first keypoints in the first image and second keypoints in the second image; - associating each first keypoint with a corresponding second keypoint in order to form a corresponding keypoint match; - calculating a plurality of distance ratios by selecting pairs of keypoint matches and for each selected pair of keypoint matches, calculating a distance ratio between a first distance and a second distance, the first distance being the distance between the first keypoints of said pair of keypoint matches and the second distance being the distance between the second keypoints of said pair of keypoint matches; - determining the statistical distribution of the plurality of calculated distance ratios in the form of a histogram; - calculating a plurality of outlier distance ratios by randomly selecting sets of four keypoints, each set containing two randomly drawn first keypoints and two randomly drawn second keypoints, and by calculating the distance ratio between the distance between said randomly drawn first keypoints and the distance between said randomly drawn second keypoints; - generating an outlier model function, said outlier model function being a proper probability density function which models the statistical distribution of the plurality of outlier distance ratios; - assessing whether the first image contains a view of an object depicted in the second image by making a binary decision between the following hypothesis H0, H1 - H0: the first image does not correspond to the second image; - H1: the first image corresponds to the second image, said binary decision being carried out as follows: - if said histogram fits the outlier model function well, then the H0 hypothesis is accepted; - if not, then the H1 hypothesis is accepted. - identifying first keypoints in the first image and second keypoints in the second image; - associating each first keypoint with a corresponding second keypoint in order to form a corresponding keypoint match; - calculating a plurality of distance ratios by selecting pairs of keypoint matches and for each selected pair of keypoint matches, calculating a distance ratio between a first distance and a second distance, the first distance being the distance between the first keypoints of said pair of keypoint matches and the second distance being the distance between the second keypoints of said pair of keypoint matches; - determining the statistical distribution of the plurality of calculated distance ratios in the form of a histogram; - calculating a plurality of outlier distance ratios by randomly selecting sets of four keypoints, each set containing two randomly drawn first keypoints and two randomly drawn second keypoints, and by calculating the distance ratio between the distance between said randomly drawn first keypoints and the distance between said randomly drawn second keypoints; - generating an outlier model function, said outlier model function being a proper probability density function which models the statistical distribution of the plurality of outlier distance ratios; - assessing whether the first image contains a view of an object depicted in the second image by making a binary decision between the following hypothesis H0, H1 - H0: the first image does not correspond to the second image; - H1: the first image corresponds to the second image, - H0: the first image does not correspond to the second image; - H1: the first image corresponds to the second image, - if said histogram fits the outlier model function well, then the H0 hypothesis is accepted; - if not, then the H1 hypothesis is accepted.