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

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

Post 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__

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post