Display Image using Matplotlib

Pubblicato il: 07 settembre 2016
sul canale di: 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


In questa pagina del sito puoi guardare il video online Display Image using Matplotlib della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Decipher Technic 07 settembre 2016, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 9,339 volte e gli è piaciuto 35 spettatori. Buona visione!