explain def display(image_np): cv2.imshow("image",image_np) cv2.waitKey() 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