我想借助Python中的imagehash函数获取图像的指纹,但为了应用
hash = imagehash.average_hash(Image.open(path))图像需要存储在存储中。有没有什么方法可以通过给出图像的URL来获取图像的指纹?
发布于 2021-06-24 12:05:35
您可以使用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))https://stackoverflow.com/questions/68109356
复制相似问题