I have written a basic Python code to create an image and then putting a rectangle on the boundaries. This doesn\'t seem to work. I have checked multiple sites and this is t
In some cases OpenCV will need wrapping image with UMat class.
img = Image.new('RGB', (800, 900), color= (171, 183, 255)) open_cv_image = np.array(img) image = cv2.UMat(open_cv_image).get() cv2.rectangle(open_cv_image,(0,0),(800,900),(0,0,0),30)