Page 1 of 1

Wie kann ich ein Bild von einer Internet -URL in Python CV2, Scikit Image und Mahotas lesen?

Posted: 10 Feb 2025, 10:04
by Guest
Wie kann ich ein Bild aus einer Internet -URL in Python CV2 lesen?

Code: Select all

import cv2.cv as cv
import urllib2
from cStringIO import StringIO
import PIL.Image as pil
url="some_url"

img_file = urllib2.urlopen(url)
im = StringIO(img_file.read())
< /code>

ist nicht gut, weil Python mir gemeldet wurde: < /p>

TypeError: object.__new__(cStringIO.StringI) is not safe, use cStringIO.StringI.__new__