1. 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; forming matches between the first and second keypoints by associating each first keypoint with a corresponding second keypoint; calculating a plurality of first distance ratios, each first distance ratio being based on the ratio of the distance between a pair of said first keypoints and the distance between a corresponding pair of said second keypoints matching the pair of first keypoints; arranging a distribution of values of said calculated plurality of first distance ratios in a histogram having a plurality of ordered bins each corresponding to a respective interval of values of the first distance ratios, the histogram enumerating for each bin a corresponding number of first distance ratios of the distribution having values comprised within the respective interval; generating an outlier density function expressing a statistical distribution of a plurality of second distance ratios corresponding to a random selection of keypoints pairs in the first and second images, said plurality of second distance ratios being based on the ratio of the distance between pairs of first keypoints in the first image and the distance between corresponding pairs of randomly selected second keypoints in the second image; discretizing said outlier density function by generating for each of said bin a corresponding outlier probability density value; determining a number of correct keypoint matches, each formed by a first and a second keypoint corresponding to a same point of a same object depicted in the first and second images, said determining a number of correct keypoint matches including: determining a matrix, each element of said matrix corresponding to a respective pair of keypoint matches and having a value corresponding to the difference between the value of said histogram at the bin including the distance ratio of the respective pair of keypoint matches and the outlier probability density value corresponding to said bin, said outlier probability density value being weighted by a parameter; determining a value of the parameter such that the dominant eigenvector of the matrix is equal to a vector having elements of a first value if the matched pair of keypoints is estimated to be a correct keypoint match and of a second value if the matched pair of keypoints is estimated to be an incorrect keypoint match; and determining the number of correct keypoint matches as an expression of the dominant eigenvalue associated to said dominant eigenvector, wherein for comparing said first image with said second image the determined number of correct keypoint matches is exploited.