openCV- imshow & waitkey

why cv2.imshow() and cv2.waitkey() don’t work well?

Hi,

you need to output your image inline, for example using matplotlib.pyplot:

#%%
import cv2
from matplotlib import pyplot as plt
#%%
image = cv2.imread('image.png')
plt.imshow(image)

or using Lets-Plot:

#%%
import cv2
from lets_plot import *
#%%
image = cv2.imread('image.png')
ggplot() + geom_image(image)