I wrote a program in C++, using wiring pi for the LED, trigger, ad openCV3.2 for the camera. It works, taking a photo, when the button is pressed, but the photo quality is low, even in a well lit room. I think this is because the exposure time is too short.
How can I increase the exposure time, to produce higher quality images?
here is my source, from the function that needs help:
...
void imgGet(){
cv::VideoCapture cap(0);
cap.set(CAP_PROP_EXPOSURE,1);
Mat frame;
cap >> frame;
string fileName = getFName(); //returns a string for file naming
imwrite(fileName, frame);
}
...
The VideoCapture documentation is here: but the program returns
VIDIOC_S_CTRL: Invalid argument
it takes the photo, but the exposure time never changes.
Here is an example of what I'm experiencing (both are taken without flash):
This is the image quality after running my program:
This image is from another OpenCV program, that streams Video. The image becomes saturated as I expect, because the camera is on for a longer period of time. This is a side effect of the video streaming continuously. What I want to do is control it.