首页 > 解决方案 > Display image from url using holoviews

问题描述

How can I display an image from url. This result an error

import urllib
img = urllib.request.urlopen('https://www.edgystl.com/wp-content/uploads/2018/01/leather-bicker-jacket-model-street-style-men-1-e1530998880646.jpg')
hv.RGB(img)

标签: python-3.xholoviews

解决方案


原来它可以用 skimage 完成

import holoviews as hv
from skimage import io

img = io.imread('https://www.edgystl.com/wp-content/uploads/2018/01/leather-bicker-jacket-model-street-style-men-1-e1530998880646.jpg')
hv.RGB(np.array(img))

推荐阅读