I have a python code which captures images using the cv2 module of OpenCV. But when changing the exposure and gain parameters of the camera, they do not take the value that I indicate, what could be happening?.
Attached the part of the code in which I assign the values to the parameters .
#Range
brightness= 4 #0-8
contrast=4 #0-8
saturation=4 #0-8
sharpness=5 #0-8
exposure= 7 #0-100
gain=2 #0-100
white_balance=2800 #2800-6500
cap.set(cv2.CAP_PROP_AUTO_EXPOSURE,0)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, resolucion[0])
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, resolucion[1])
cap.set(cv2.CAP_PROP_FPS, fps)
cap.set(cv2.CAP_PROP_BRIGHTNESS,brightness)
cap.set(cv2.CAP_PROP_CONTRAST,contrast)
cap.set(cv2.CAP_PROP_SATURATION,saturation)
cap.set(cv2.CAP_PROP_EXPOSURE,exposure)
cap.set(cv2.CAP_PROP_GAIN,gain)