I need some help with my svm-based classifier. I am trying to compute HOG features from images and use them to train an svm. Right now I have a vector< vector > with columns containing features and rows for each image. In order to train CvSVM I need a Mat matrix with the features. How can I convert the vector of vectors into a Mat with the same shape?
vector<vector<float>> totFeaturesVector;
for all images:
vector<float> featuresVector;
//populate featuresVector with 3780 floats...
totFeaturesVector.push_back(featuresVector);
end for.
//numCols = 3780 numRows = 6. 6 images with 3780 features each.
//Need to convert totFeaturesVector to
//Mat training_mat(overallSamples,numCols,CV_32FC1); Something like this.