我有一个 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 ;}
在此先感谢您的帮助