opencv - how to convert cv:Mat to vector<float> descriptors? -
i met problem when communicating pales in tcp. received data processed in asn1 struct such :
mat ::= sequence { numrows integer, numcols integer, data bit string, type integer } i can construct matrix cv::mat. however, need query in format: vector descriptors. question how can convert mat vector?
i don't think, can avoid copy:
mat m(3,3,cv_32f); vector<float>v; v.insert(v.begin(),m.begin(),m.end());
Comments
Post a Comment