Compare Images Test Compare images using PIL and the image histogram. More close to the zero (0.0), more equal are the images. Try to use images with the same size. Test with unittest python -m unittest image_file_test