Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I have the same problem using Ubuntu 12.04 and OpenCV 2.4.6. Using guvcview, I can set the image size to up to 1920 x 1080 but I can only read VGA images in OpenCV.

The camera is opened as: cap = VideoCapture(dev_id); assert(cap.isOpened());

// returns 1
std::cout<< cap.set(CV_CAP_PROP_FOURCC,CV_FOURCC('M','J','P','G')) << std::endl;

// returns 0
std::cout<< cap.set(CV_CAP_PROP_FRAME_WIDTH, 1280)         << std::endl;
std::cout<< cap.set(CV_CAP_PROP_FRAME_HEIGHT, 720)       << std::endl;

Has anyone managed to get larger images in OpenCV?