1. A computer implemented method comprising: obtaining, by a processor, a first and second images for comparison; globally registering, by a processor, the first and second images; calculating, by a processor, for pairs of a first patch x of the first image and second patch y of the second image a similarity measure SM(x,y) wherein the similarity measure SM satisfies for any 
 aâˆˆ[ 0,1 ],SM ( x,y )â‰¦ SM ( x,ax +(1 âˆ’a ) y ); determining similarity measures for each of the pairs of patches; and determining a similarity of the first and second images based on the calculated similarity measures for each of the pairs of patches.