Problem with cvSetCaptureProperty in Windows 8
Hi everyone,
I use OpenCV in my project of Augment Reality. The original platform is Windows 7 and everything works perfect - full-screen with 1080p. However, when I launched my program on Windows 8 it showed live video with resolution 640x480. The same program on the same hardware, but with different OS Windows shows different results. I wrote simple test program which show the same problem:
include "highgui.h"
int main()
{
cvNamedWindow("VideoTest", CV_WINDOW_AUTOSIZE);
CvCapture *capture = cvCreateCameraCapture(0);
CvSize size = cvSize(1920, 1080);
cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH , size.width);
cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT , size.height);
IplImage* frame;
while(1)
{
frame = cvQueryFrame(capture);
if(!frame) break;
cvShowImage("VideoTest", frame);
char c = cvWaitKey(33);
if(c == 27) break;
}
cvReleaseCapture(&capture);
cvDestroyWindow("VideoTest");
return 0;
}
I think that there is problem with - cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH , size.width); But I have no idea how to resolve it. I would be glad any help.