I am using opencv 4.6.0 under Mac OSX.
USB camera is a Waveshare IMX335-based 5M pixel
I would like to have control of the exposure, contrast and gain.
The following work correctly (both set and get):
w = capture.get(cv2.CAP_PROP_FRAME_WIDTH)
h = capture.get(cv2.CAP_PROP_FRAME_HEIGHT)
f = capture.get(cv2.CAP_PROP_FPS)
These following do NOT work. They always return 0, and set has no effect:
e = capture.get(cv2.CAP_PROP_EXPOSURE)
g = capture.get(cv2.CAP_PROP_GAIN)
c = capture.get(cv2.CAP_PROP_CONTRAST)
s = capture.get(cv2.CAP_PROP_SATURATION)
b = capture.get(cv2.CAP_PROP_BRIGHTNESS)
r = capture.get(cv2.CAP_PROP_FRAME_COUNT)
The manufacturer says that these should work correctly. According to the documentation, the camera “supports UVC protocol”. Is there anything I can experiment with at the opencv end to fix this?
My mistake: I thought that the camera would provide an integer count for its frames.
capture.getBackendName() returns “AVFOUNDATION”
I don’t know which backends might be available, or which one(s) to use. Is there a way that I can query to list the available backends? Then I can try them all. Hopefully at least one will work as hoped.