Usando matplotlib¶
In [1]:
%matplotlib inline
import matplotlib.pyplot as plt
import matplotlib.image as image
img = image.imread("img/imagen.png")
print(type(img))
plt.imshow(img)
Out[1]:
Usando PIL¶
In [2]:
from PIL import Image
img = Image.open("img/imagen.png")
img.show()
Usando IPython¶
In [3]:
from IPython.display import display, Image
display(Image(filename='img/imagen.png'))
In [ ]:
import cv2
imagen = cv2.imread('img/imagen.png',0)
cv2.imwrite('Grises.png',imagen)
cv2.imshow('Logo OpenCV Grises',imagen)
cv2.waitKey(0)
cv2.destroyAllWindows()
No hay comentarios.:
Publicar un comentario