I am using opencv 2.7 and python27. I tried getting and changing the camera settings such as contrast, brightness,gain,exposure,etc. I am not able to change any of the camera properties viz EXPOSURE, ZOOM, FOCUS. Though I am able to read the exposure value which shows up in the range of -5 to -1. I don't know if this is the correct value it is showing. But I not not able change it using this command in python- cap.set(cv2.cv.CV_CAP_PROP_EXPOSURE,-3). Any help in changing the exposure setting will be very helpful.
import numpy as np
import cv2
cap = cv2.VideoCapture(0)
gain = cap.get(cv2.cv.CV_CAP_PROP_GAIN)
print "Gain: {0}".format(gain)
cap.set(cv2.cv.CV_CAP_PROP_GAIN,120)
cap.set(cv2.cv.CV_CAP_PROP_EXPOSURE,-3)
expo = cap.get(cv2.cv.CV_CAP_PROP_EXPOSURE)
print "Exposure: {0}".format(expo)
cap.release()