I am working on a project which requires functions from OpenCV to plot images. I am trying to display image using the below code in Google Colab. But nothing shows up in the output. Can anybody help me with this?
%pylab notebook
import cv2
testim = imread('butterfly.jpg')
figure()
imshow(testim)
plt.show()
Screenshot:
Google colab crashes if you try to display image using cv2.imshow()
instead import from google.colab.patches import cv2_imshow
and display using cv2_imshow(<image>)