-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
CAP_PROP_AUTO_EXPOSURE not working with DSHOW backend #17019
Copy link
Copy link
Closed
Labels
Hackathonhttps://opencv.org/opencv-hackathon-starts-next-week/https://opencv.org/opencv-hackathon-starts-next-week/category: videoio(camera)confirmedThere is stable reproducer / investigation completeThere is stable reproducer / investigation completefeatureplatform: win32priority: low
Description
System information (version)
Python 3.7.4 (64 bit)
Windows 10
opencv-python==4.0.0.21
opencv-contrib-python==4.0.0.21
Detailed description
I'm able to turn the autoexposure off and set the exposure manually using cv2.CAP_PROP_EXPOSURE and turn the autoexposure back on using CAP_PROP_AUTO_EXPOSURE with MSMF backend. With DSHOW backend however, I cannot turn the autoexposure back on.
Code
import cv2
_capture = cv2.VideoCapture(0, cv2.CAP_DSHOW)
_ret, img = _capture.read()
# turn the autoexposure off
print(_capture.set(cv2.CAP_PROP_EXPOSURE, -7)) # works
# print(_capture.set(cv2.CAP_PROP_EXPOSURE, 1)) # didn't work
print(_capture.set(cv2.CAP_PROP_AUTO_EXPOSURE, 0.75)) # didn't work
_ret = True
while _ret:
_ret, img = _capture.read()
key_code = cv2.waitKey(1)
if (key_code == 27) or (key_code == ord('q')):
break
cv2.imshow('img', img)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Hackathonhttps://opencv.org/opencv-hackathon-starts-next-week/https://opencv.org/opencv-hackathon-starts-next-week/category: videoio(camera)confirmedThere is stable reproducer / investigation completeThere is stable reproducer / investigation completefeatureplatform: win32priority: low