Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

i'm guessing, that you want Mat Hogfeat; for further ml processing, where you'd need each feature on a row, while just putting a vector<float> gives you a column Mat:

vector<float> ders;
Mat Hogfeat;

HogFeat.push_back( Mat(ders, true).reshape(1,1) );  // deep copy & reshape

i'm guessing, that you want Mat Hogfeat; for further ml processing, where you'd need each feature on a row, while just putting a vector<float> into a cv::Mat gives you a column Mat:

vector<float> ders;
Mat Hogfeat;

HogFeat.push_back( Mat(ders, true).reshape(1,1) );  // deep copy & reshape