Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 2017-04-18 21:28:50 -0500

Nbb gravatar image

Convert cv::Vec<double, 10="">> to std::vector

Given a data that I get from a matrix with 10 channels

cv::Mat data = cv::Mat(cv::Size(100, 100), CV_64FC(10));<cv::Vec<double, 10>>(5, 5);

Is there an efficient way to convert this to a std::vector<double> of size 10 ? I could just create a vector of size 10 and initialize it with the data but I would like to know of a more efficient way.