cv2 imshow numpy array code example
Example: import numpy import cv2 cv2.imshow('image',img) cv2.waitKey(0)
import cv2
import numpy as np
#numpy array
ndarray = np.full((300,300,3), 125, dtype=np.uint8)
#show image
cv2.imshow('Example - Show image in window', ndarray)
cv2.waitKey(0) # waits until a key is pressed
cv2.destroyAllWindows() # destroys the window showing image