Skip to content

Instantly share code, notes, and snippets.

@ayang
Created September 7, 2013 11:52
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save ayang/6474956 to your computer and use it in GitHub Desktop.
Save ayang/6474956 to your computer and use it in GitHub Desktop.
display opencv image using matplotlib in ipython notebook
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vignesh-m
Copy link

add this magic command to show matplotlib automatically
%matplotlib inline

@yeison
Copy link

yeison commented Oct 9, 2016

That's great magic ^ I was confused for a moment

@aybakana
Copy link

add "plt.show()"

@akashpurandare
Copy link

I think cv2.cv.CV_BGR2RGB is replaced with cv2.COLOR_BGR2RGB now. Great gist, really helpful!

@Killer1504
Copy link

image show in jupyter notebook very small. how i can show it bigger?

@anikdas
Copy link

anikdas commented Nov 27, 2018

@Killer1504 use the following

plt.rcParams['figure.figsize'] = [20, 10]
plt.imshow(img)
plt.show()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment