如何解决OpenCV 3和C ++中的GpuAcc_64.dll异常?

时间:2016-11-29 10:03:31

标签: c++ windows opencv

当我尝试在C ++(OpenCV 3)中使用uEye相机时,我在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);

1 个答案:

答案 0 :(得分:1)

如果您使用的是具有专用和板载GPU的笔记本电脑,请尝试禁用其中一个,看看是否有效。

我不知道到底是什么导致了这个问题,但这就是为我解决问题的原因。 (更具体地说,禁用我的板载GPU修复它)