Home > Mobile >  OpenCV Video Capture Get Properties Not Work
OpenCV Video Capture Get Properties Not Work

Time:11-05

I'm using Python 3.10 in Windows 10 PC to control Logitech C925e Webcam. I tried to change the cv2.CAP_PROP_BRIGHTNESS (using method set) to some value. The brightness of my video stream changed, but when I tried to get value cv2.CAP_PROP_BRIGHTNES (using method get), i always got same value (128.0).

Why this happen? It's weird because the brightness of my video stream changed, but the value cv2.CAP_PROP_BRIGHTNES not changed.

I expect to get same value after set the cv2.CAP_PROP_BRIGHTNESS

CodePudding user response:

After I changed the API parameter in VideoCapture to cv2.CAP_DSHOW, it resolved! In the past, I use the default API which is cv2.MSMF

self.camera.capture = cv2.VideoCapture(0, cv2.CAP_DSHOW)
  • Related