Search code examples
opencvwindows-10nvidiamingw-w64

System Crash on Executing Opencv Program


I have an asus R5 10 JX laptop with GPU Nvidia GTX 950M. I am planning to do an opencv project. I built open cv on windows 10 using mingw-CodeBlocks. I compiled and ran the following code:

#include <opencv2/core/utility.hpp>
#include <iostream>
#include <opencv2/videoio.hpp>
#include <opencv2/highgui.hpp>
using namesapce cv;
int main()
{
  VideoCapture cap(0);
 }

Hpwever when I ran the program my webcam just lights up and then the system crashes- a BSOD error. I discovered that the error was originating in the nvlddmkm.sys driver of the Nvidia GPU (analysis of the system dump revealed that and my program runs fine when I disable the GPU). The drivers of Nvidia are all upto date. Can somebody please help?


Solution

  • I had the same problem. I just uninstalled Nvidia driver and let Windows 10 installs its own. Everything work fine now!