Reputation: 33
I want to get fingerprints for images with the help of the imagehash function in Python but in order to apply
hash = imagehash.average_hash(Image.open(path))
the image needs to be in storage. Is there any way from which by just giving the image URL I can get the fingerprint of the image?
Upvotes: 1
Views: 417
Reputation: 11496
You can use requests
:
url = 'https://commons.wikimedia.org/wiki/File:Example.png'
import requests
response = requests.get(url, stream=True)
ihash = imagehash.average_hash(Image.open(response.raw))
Upvotes: 1