title: OpenCV unhandled exception error
body: <p>I am running the code I am using the opencv functions imread() and the data structure Mat. </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;opencv2/core/core.hpp&gt;
  #include &lt;opencv2/highgui/highgui.hpp&gt;
  using namespace cv;
  
  int main(){
      int x;
      Mat img = imread("D:/OwnResearch/photo2.jpg");
      std::cout &lt;&lt; img &lt;&lt; std::endl;
      std::cin &gt;&gt; x;
      return 0;
  
  
  }
  </code></pre>
  
  <p>And I keep receiving the error Unhandled exception at 0x0000000000000000 in opencvtest.exe: 0xC0000005: Access violation executing location 0x0000000000000000. It seems like nothing is being loaded. I checked the directory of the file and it seems to be correct. I am not sure what the problem is. </p>