I am fairly new to using OpenCV and on a tutorial, I was shown that you can adjust the brightness of either your webcam or a video by using cap.set(). However, whenever I try setting the values for brightness nothing seems to get happening, and when I use cap.get() to get the brightness value, it always ends up returning 0. What can I do to fix this issue?
import cv2
videoCapture = cv2.VideoCapture(0)
#Set Brightness
videoCapture.set(cv2.CAP_PROP_BRIGHTNESS, 1000) #Nothing is changed.
current_brightness = videoCapture.get(cv2.CAP_PROP_BRIGHTNESS)
print(current_brightness) #This doesn't work, it keeps returning 0, which isn't suppose to happen.
while True:
canPlay, vidFrame = videoCapture.read()
cv2.imshow("Video", vidFrame)
if cv2.waitKey(1) == ord('q'):
break