Display Image using Matplotlib

Publié le: 07 septembre 2016
sur la chaîne: Decipher Technic
9,339
35

Using Matplotlib, display images.

Code:
import cv2#opencv library
from matplotlib import pyplot as plt #import the plotting function

#read the image
img=cv2.imread('messi.jpg',0)#reads in BGR format
#img=cv2.cvtColor(img,cv2.COLOR_BGR2RGB)#CONVERT BGR TO RGB FORMAT
#display this image
plt.imshow(img,cmap='gray',interpolation='BICUBIC') #displays in the RGB format
plt.xticks([]), plt.yticks([]) #hide the tick values on both axes
plt.show()

Smooth Sailing (with Guitar) by Audionautix is licensed under a Creative Commons Attribution license (https://creativecommons.org/licenses/...)
Artist: http://audionautix.com/

You are welcome to visit my technical blog:
https://www.deciphertechnic.com

Comment below for any queries or suggestions


Sur cette page du site, vous pouvez voir la vidéo en ligne Display Image using Matplotlib durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Decipher Technic 07 septembre 2016, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 9,339 fois et il a aimé 35 téléspectateurs. Bon visionnage!