resolution not responding properly to query
-If i set the resolution, then query it after, it doesn't (always) show up. Sometimes it does. But it's not consistent.
I know most of this is old syntax, i'm converting as i go along. Maybe that's the reason for the resolution reporting value being inconsistent. And yes i know i'm setting CAP_PROP_FRAME_WIDTH, and querying CV_CAP_PROP_FRAME_WIDTH. I can't set CV_CAP_PROP_FRAME_WIDTH, that's why :-)
capture.set(cv::CAP_PROP_FRAME_WIDTH, 320);
capture.set(cv::CAP_PROP_FRAME_HEIGHT, 240);
// We'll allow these values to be adjusted later in our program
// but as a default we base them on resolution
cout << capture.get(CV_CAP_PROP_FRAME_WIDTH) << endl;
cout << capture.get(CV_CAP_PROP_FRAME_HEIGHT) << endl;
lvl1=capture.get(CV_CAP_PROP_FRAME_WIDTH)/30;
lvl2=capture.get(CV_CAP_PROP_FRAME_WIDTH)/20;
lvl3=capture.get(CV_CAP_PROP_FRAME_WIDTH)/10;
cout << "Level 1 threshold set to: " << lvl1 << endl;
cout << "Level 2 threshold set to: " << lvl2 << endl;
cout << "Level 3 threshold set to: " << lvl3 << endl;
Any idea's would be appreciated.
just to elaborate, by not showing up i mean it takes the requested resolution alright, but the cout does not always show the right resolution, almost as if it didnt have time yet to update it.