Ask Your Question

Revision history [back]

cap.set property is not working in C++

While cap.get property is working, I used cap.set property in a simple code but it doesn't seem to be working:

cap.set(CV_CAP_PROP_FPS, 60);
cap.set(CV_CAP_PROP_FRAME_HEIGHT, 360.0);

for(;;)
{
    cap >> frame;
    if( frame.empty() ) break; // end of video stream
    imshow("Display Window",frame);

    if( waitKey(1) == 27 ) break; // stop capturing by pressing ESC
}
waitKey();
return 0;

Any ideas, am I missing something here?

Thanks.