Ask Your Question

Xirexel's profile - activity

2014-07-08 05:25:52 -0600 received badge  Self-Learner (source)
2013-03-24 20:34:46 -0600 answered a question Problem with cvSetCaptureProperty in Windows 8

After some times I found the suitable decision of this problem. I have included Media Foundation in my project and have written simple C++ class for this. Short article about it is showed on Capturing of video from web-camera on Windows 7 and 8 by Media Foundation

2013-02-28 18:53:14 -0600 asked a question 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.