1. Method for detecting differences between two images, wherein the method comprises the steps of: transforming the images by resizing the images in order to get identical image sizes, by aligning pixels of the images and by normalizing colours of the images, determining plural binary masks from the pixels of the transformed images, each binary mask being composed of one element per couple of pixels of the transformed images having same coordinates in the images, determining plural energy functions, each energy function being the sum of a first term which is representative of the transformed images and of one binary mask and of a second term which is only dependent on said one binary mask, minimizing the energy function over other plural energy functions, selecting the binary mask corresponding to the minimized energy function.