Closed zecktos closed 3 years ago
Nice addition, thank you!
Could probably de-dupe some code and make it clearer about intent like so:
if type(image) is not np.ndarray:
image = np.array(image.convert('RGB'))
pb = image.rot90(image, rotation // 90).astype('uint8')
May need to add a test case for this, but I appreciate this code path is currently utterly untested so I might have to fix that.
Oh yes this is a more elegant way
This is a small change to display opencv images, as they are already numpy arrays. This makes it easy to play video files or camera capture. Make sure to call
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
before you pass the image todisplay()
.