当我尝试在C ++(OpenCV 3)中使用一个uEye相机时,我得到exception抛出在0x …..(GpuAcc_64.dll)。 任何想法如何解决这个问题? 这发生在代码行“VideoCapture capture = VideoCapture(1);”
我的代码:
#include "opencv2/highgui.hpp" #include "opencv2/opencv.hpp" #include "opencv2/calib3d.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> #include <fstream> using namespace cv; using namespace std; int main() { // The number of boards you want to capture, the number of internal corners horizontally // and the number of internal corners vertically (That's just how the algorithm works). int numBoards; int numCornersHor; int numCornersVer; cout << "Enter number of corners along width: "; cin >> numCornersHor; cout << "Enter number of corners along height: "; cin >> numCornersVer; cout << "Enter number of boards: "; cin >> numBoards; // We also create some additional variables that we'll be using later on. int numSquares = numCornersHor * numCornersVer; Size board_sz = Size(numCornersHor, numCornersVer); // We want live feed for our calibration! VideoCapture capture = VideoCapture(1);
如果您使用的是带有专用GPU的笔记本电脑,请尝试禁用其中一个并查看是否有效。
我不知道究竟是什么原因导致这个问题,但这是解决了我的问题。 (更具体地说,禁用我的板载GPU固定它)