Closed rlewkowicz closed 4 years ago
OpenCV uses BGR as its default.
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
D3DShot captures RGB images.
OpenCV's functions expect BGR images.
So, as you discovered, the solution is to convert the D3DShot image from RGB -> BGR
via cv2.cvtColor
.
PS: And btw, cvtColor
is the fastest way to do the color conversion. Numpy "magic math" is much slower, as proven here: https://answers.opencv.org/question/219040/fastest-way-to-convert-bgr-rgb-aka-do-not-use-numpy-magic-tricks/
I can't tell if this is open cv or this library, but one of the channels is messed up
vs what it's supposed to look like:
I didn't see this issue with other libraries, but I might still be doing something wrong