Hi, I m using opencv 4.1.2 and Macbook to set camera properties but continously getting False in response for brightness and exposure while height and width are fine.
Macbook
OpenCV 4.1.2
Logitech Brio 4K
import cv2
import time
cap = cv2.VideoCapture(1,cv2.CAP_AVFOUNDATION)
r=cap.set(3,1920)
print(r)
r=cap.set(4,1080)
print(r)
time.sleep(2)
r1=cap.set(cv2.CAP_PROP_AUTO_EXPOSURE, 0)
r=cap.set(cv2.CAP_PROP_EXPOSURE, -7)
print(r1)
print(r)
r=cap.set(cv2.CAP_PROP_BRIGHTNESS,1.0)
print(r)
print(cap.get(cv2.CAP_PROP_BRIGHTNESS))
ret, img = cap.read()
img1="1.jpg"
cv2.imwrite(img1, img)
#cv2.imshow(img)
cap.release()
Response
True
True
False
False
False
0.0
↧