Answers for "import numpy import cv2 cv2.imshow('image',img) cv2.waitKey(0)"

0

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
Posted by: Guest on May-23-2021

Python Answers by Framework

Browse Popular Code Answers by Language