SAD comparison of images