Answers for "show image in jupyter notebook opencv"

1

display cv2 image in jupyter notebook

# matplotlib interprets images in RGB format, but OpenCV uses BGR format

# so to convert the image so that it's properly loaded, convert it before loading

img = cv2.imread('filename.ext')		# this is read in BGR format
rgb_img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)		# this converts it into RGB

plt.imshow(rgb_img)
plt.show()
Posted by: Guest on August-10-2020
0

show image jupyter notebook

#If you want it on a "Code" cell
from IPython.display import Image
Image("img/picture.png")

#If you want it on a "Markdown" cell
![title](img/picture.png)
Posted by: Guest on January-16-2021

Code answers related to "show image in jupyter notebook opencv"

Python Answers by Framework

Browse Popular Code Answers by Language