摘要:
#sudo pip install PILdef pil_image_similarity(filepath1, filepath2):from PIL import Imageimport mathimport operatorimage1 = Image.open(filepath1)image2 = Image.open(filepath2)# image1 = get_thumbnail(img1)# image2 = get_thumbnail(img2)h1 = image1.histogram()h2 = image2.histogram()rms = math.sqrt(red 阅读全文