You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm making a small program that opens a window with a pyautogui.screenshot of their mouses position, constantly.
In this window, the colors seem to be swapped. This happens mainly to orange and blue. This has happened on macOS and windows 10, with a ViewSonic Omni monitor and the Omen 15's display on macOS and Windows 10 respectively.
pyautogui.screenshot() returns a Pillow Image Object in RGB (Red, Green, Blue) color format by default. But cv2.imshow() expects an image in the form of numpy array and color format BGR (Blue, Green, Red).
You can use this cv2.cvtColor(image, cv2.COLOR_RGB2BGR) to convert image from RGB to BGR color format.
I'm making a small program that opens a window with a pyautogui.screenshot of their mouses position, constantly.
In this window, the colors seem to be swapped. This happens mainly to orange and blue. This has happened on macOS and windows 10, with a ViewSonic Omni monitor and the Omen 15's display on macOS and Windows 10 respectively.
This is my code:
Any help would be greatly appreciated, and apologies if my code is formatted terribly, I am a beginner to programming in general.
The text was updated successfully, but these errors were encountered: