title: Convert vectors of mat to Mat file in order to use opencv svm
body: <p>I ve got two vectors and I want to convert them  Mat files in order to use opencv's SVM train. The vectors that I have got is one a vector for train data and a vector for labels. How is it possible to convert them to the necessary type from svmtrain??/</p>
  
  <pre><code>for(int i=0; i&lt;face.size();i++){
          img = imread("faceNface/face/"+face.at(i),1);
          cvtColor(img, img, CV_BGR2GRAY);
          img = img.reshape(1, 12100).t();
          trainData.push_back(img);
          lbs.push_back(1);
      }
  
      for(int i=0; i&lt;non_face.size();i++){
          img = imread("faceNface/nonface/"+non_face.at(i), 1);
          cvtColor(img, img, CV_BGR2GRAY);
          img = img.reshape(1, 12100).t();
          trainData.push_back(img);
          lbs.push_back(-1);
      }
  </code></pre>