1
我有一个1280x1024的视频输入设备,我写了一个小型的opencv项目来捕捉它的图像,但我只得到一个640x480图像??任何身体有想法,为什么我得到的,这里是我的代码:调整视频捕捉的分辨率
#include <opencv2\highgui\highgui.hpp>
#include <opencv2\core\core.hpp>
#include <opencv2\opencv.hpp>
using namespace std;
int main(){
cv::VideoCapture cap(2);
cv::Mat frame;
int key = 0;
while(key != 27){
cap.read(frame);
cv::imshow("test",frame);
key = cv::waitKey(10);
}
return 0 ;}
在此先感谢您的帮助
你可以去看看在这里: http://stackoverflow.com/questions/14287/increasing-camera-capture-resolution-in-opencv – 2013-04-11 12:18:30