title: Load an csv file for SVM predict in OpenCV using C++
body: <p>I have a .csv file that I want to load in order to use the predict SVM function using OpenCV 3.4.0 and C++, but I can't get it right. How can this operation be done in OpenCV 3.4.0?<br>
  This is the way I'm trying to use the predict function and load the csv file:</p>
  
  <pre><code>Mat srct = imread("D:/.../00024_00020.ppm", CV_LOAD_IMAGE_GRAYSCALE);
  
  if (!srct.data)
      cout &lt;&lt; "Could not read the test image!" &lt;&lt; endl;
  
  Mat sout;
  srct.copyTo(sout);
  resize(sout, sout, cvSize(32, 32));
  
  vector&lt;float&gt; derst;
  cv::HOGDescriptor hog(cv::Size(32, 32), cv::Size(16, 16), cv::Size(4, 4), cv::Size(4, 4), 9);
  hog.compute(sout, derst, cv::Size(8, 8), cv::Size(0, 0));
  
  Ptr&lt;ml::SVM&gt; svm = ml::SVM::create();
  svm-&gt;load("D:/.../GT-00014.csv"); //HERE AN ERROR IS THROWN RELATED WITH A MEMORY LOCATION
  int response = (int)svm-&gt;predict(derst);
  </code></pre>
  
  <p>The file I want to load is from GTSRB at this location: <a href="http://benchmark.ini.rub.de/?section=gtsrb&amp;subsection=dataset#Downloads" rel="nofollow noreferrer">http://benchmark.ini.rub.de/?section=gtsrb&amp;subsection=dataset#Downloads</a>.</p>
  
  <p>Any thoughts on this issue?</p>
  
  <p><strong>EDIT 1:</strong> 
  The error thrown:
  <a href="https://i.stack.imgur.com/bJUL7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bJUL7.png" alt="enter image description here"></a></p>