sunsexsurf

imagehash_compare

Apr 12th, 2020
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. import requests
  2. import imagehash
  3. from PIL import Image
  4. import io
  5.  
  6. tur1im = Image.open(io.BytesIO(requests.get(r"http://apkbank.ru/common/upload/Monets/TURGENEV-18_3_rublya.jpg").content))
  7. tur2im = Image.open(io.BytesIO(requests.get(r"http://www.cbr.ru/legacy/PhotoStore/img/5111-0395r.jpg").content))
  8.  
  9. h1 = imagehash.phash(tur1im)
  10. h2 = imagehash.phash(tur2im)
  11.  
  12. print(h1)
  13. print(h2)
Advertisement
Add Comment
Please, Sign In to add comment