title: cv::Exception at memory location 0x0000000296AFDAD0 in visual studio
body: <p>I'm trying to get eigenvalues from an image matrix. I tried with a streaming video and did not get an error. When I tried to find eigenvalues of a stored  image I get <code>cv::Exception at memory location 0x0000000296AFDAD0 error.</code></p>
  
  <pre><code>#include &lt;opencv2/objdetect/objdetect.hpp&gt;
  #include &lt;opencv2/highgui/highgui.hpp&gt;
  #include &lt;opencv2/imgproc/imgproc.hpp&gt;
  #include &lt;opencv2/core/core.hpp&gt;
  #include &lt;iostream&gt;
  #include &lt;stdio.h&gt;
  
  using namespace std;
  using namespace cv;
  void calceigen(Mat covarm){
  Mat eigenvalues;
  Mat eigenvectors;
  eigen(covarm, eigenvalues, eigenvectors);
  cout &lt;&lt; eigenvalues;
  cout &lt;&lt; eigenvectors;
  }
  
  void covard(Mat g)
  {
  Mat covarm;
  Mat b;
  calcCovarMatrix(g, covarm, b, CV_COVAR_COLS, CV_64F);
  calceigen(covarm);
  
  }
  
  
  int main(int argc, const char** argv)
  { 
  
  
  
  cv::Mat image = cv::imread("C:/Users/DellPc/Desktop/images1.jpg");
  //setup image files used in the capture process
  Mat grayscaleFrame;
  Mat graysc;
  
  
  
  
  
  
  
      //convert captured image to gray scale and equalize
      //cvtColor(image, grayscaleFrame, CV_BGR2GRAY);
  
  
      //resize(grayscaleFrame, graysc, Size(16, 16), 0, 0, INTER_LANCZOS4);
  
      int rows = image.rows;
      int cols = image.cols;
      cv::Size s = image.size();
      rows = s.height;
      cols = s.width;
      cout &lt;&lt; rows &lt;&lt; endl;
      cout &lt;&lt; cols &lt;&lt; endl;
  
      covard(image);
      //find faces and store them in the vector array
      imshow("small", image);
      waitKey(33);
  
  return 0;
  }
  </code></pre>