matplotlib
Bildbearbeitung
Suche…
Bilder öffnen
Matplotlib enthält das image zur Bildmanipulation
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
Bilder werden mit der imread Funktion aus der Datei gelesen (nur .png ):
img = mpimg.imread('my_image.png')
und sie werden von der imshow Funktion gerendert:
plt.imshow(img)
Lassen Sie uns das Grundstück Stack - Überlauf - Logo :
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
img = mpimg.imread('so-logo.png')
plt.imshow(img)
plt.show()
Die resultierende Darstellung ist
Modified text is an extract of the original Stack Overflow Documentation
Lizenziert unter CC BY-SA 3.0
Nicht angeschlossen an Stack Overflow