python - 将给定 URL 的 Jpeg 图像下载到 numpy 数组中

标签 python image numpy url jpeg

使用 python,我想下载一个给定 URL 的 Jpeg 图像并将其存储在 numpy 数组中以供以后处理。我应该使用什么库?

最佳答案

有许多库可用于此任务。我过去使用的一个来自 scikit-image:

import skimage

image_filename = "http://example.com/example.jpg"
image_numpy = skimage.io.imread( image_filename )

关于python - 将给定 URL 的 Jpeg 图像下载到 numpy 数组中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59724255/

相关文章:

python - 如何使用 PyMorph 在 Python 中的图像中添加高斯噪声

python - (Python) 高斯伯努利 RBM 计算 P(v|h)

python - 如何在 IronPython 中安装包/模块

python - 在 numpy 矩阵上调用 Google Cloud Vision API

python - flask / flask -CORS : CORS header ‘Access-Control-Allow-Origin’ missing

subreddit 主题的 CSS 图像调整大小

html - 将 html img 标签转换为 css

python - 值错误 - Python Django

python - 使用 Keras 进行免分割手写文本识别

python - 如何保存 Python 字符串列表以供将来使用