LJMUAstroecology / flirpy

Python library to interact with FLIR camera cores
Other
191 stars 54 forks source link

VideoCapture.set type error with bool arguments #12

Open jveitchmichaelis opened 4 years ago

jveitchmichaelis commented 4 years ago

Seems to be either an issue on ARM or an issue with OpenCV 4.3.

On OpenCV 4.2 / x86_64 / Python 3.7

>>> import cv2
>>> cap = cv2.VideoCapture(0)
>>> cap.set(cv2.CAP_PROP_CONVERT_RGB, False)
True
>>> cap.set(cv2.CAP_PROP_CONVERT_RGB, 1)
True
>>> cap.set(cv2.CAP_PROP_CONVERT_RGB, 0)
True

However using False on OpenCV 4.3/aarch64/Python 3.7 now causes a TypeError.

Should probably move everything to 0/1 which should be back compatible at least.