Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Issue Using OpenCV 4 Windows Build, VS 2017 - Unhandled Exception with imshow()

Hello everyone, I'm running into a big problem just trying to setup OpenCV again in my IDE with the latest version for Windows. I've done this before in earlier versions successfully, but I'm stumped this time around. I extracted the files from the downloaded .exe, added the paths to my environmental variables and setup my properties sheet properly for debug x64. However, when I implement this simple test script to see if everything is connected correctly:


#include "opencv2/opencv.hpp"

using namespace std;
using namespace cv;

int main()
{
    Mat A;
    A = Mat::zeros(100, 100, CV_32F);

    imshow("x", A);
    //waitKey(0); 
    return 0;
}

program halts on the imshow() line and my Call Stack reports:


KernelBase.dll!...
vcruntime140d.dll!...
opencv_world400d.dll!cv::Error(...
opencv_world400d.dll!cvShowImage(...
opencv_world400d.dll!cvimshow(...
The ellipses are because I don't think I need to write out all the functions parameters.

And I have tried unpacking the libraries again. Thank you!

Issue Using OpenCV 4 Windows Build, VS 2017 - Unhandled Exception with imshow()

Hello everyone, I'm running into a big problem just trying to setup OpenCV again in my IDE with the latest version for Windows. I've done this before in earlier versions successfully, but I'm stumped this time around. I extracted the files from the downloaded .exe, added the paths to my environmental variables and setup my properties sheet properly for debug x64. However, when I implement this simple test script to see if everything is connected correctly:


#include "opencv2/opencv.hpp"

using namespace std;
using namespace cv;

int main()
{
    Mat A;
    A = Mat::zeros(100, 100, CV_32F);

    imshow("x", A);
    //waitKey(0); 
    return 0;
}

program halts on the imshow() line and my Call Stack reports:


KernelBase.dll!...
vcruntime140d.dll!...
opencv_world400d.dll!cv::Error(...
opencv_world400d.dll!cvShowImage(...
opencv_world400d.dll!cvimshow(...
The ellipses are because I don't think I need to write out all the functions parameters.

And I have tried unpacking the libraries again. Thank you!

Followup Info:

I just built my own version from the source using CMake, and I am still getting the same issue, where KernelBase.dll is the farthest I get on the Call Stack before everything falls apart.