how can I set VideoCapture attributes with set?
I am trying to adjust the gain in a simple camera function
void imgGet(){
cv::VideoCapture cap(0);
double k=0.99;
cap.set(CAP_PROP_EXPOSURE,1);
Mat frame;
cap >> frame;
string fileName = getFName();
imwrite(fileName, frame);
}
Ive tried a variety of things, but the error I get is:
VIDIOC_S_CTRL: Invalid argument
I don't know what that means, how am I supposed to set the VideoCapture::set object? I have seen the videocapture documentation
but I didnt understand it in a useful way. I am on a Linux PC. despite the error, an image is still taken, but the image quality is unchanged.
It should be
It is not an opencv message. May be CV_CAP_PROP_GAIN cannot be set on your camera...
I am guessing the second answer of @LBerger is right. Your camera has to support the programmatically setting of these parameters, and OpenCV must be using a camera interface that supports the set function. So please provide us your CMAKE output (to know which interfaces are enabled) and the type of your camera.