Created
January 18, 2025 07:18
-
-
Save seieric/51a0f735d63f8f2b5e681ad14c1673d3 to your computer and use it in GitHub Desktop.
cv2_imshow patch for normal jupyter notebooks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PIL import Image | |
| from IPython.display import display | |
| def cv2_imshow(img): | |
| img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) | |
| pil_img = Image.fromarray(img) | |
| display(pil_img) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment