1 | initial version |
The constructor shall do it: std::vector< float > array(mat.data);
. But if your mat is not float, but uchar 3 channels, then you should transform it: mat.convertTo(mat, CV_32F);
2 | No.2 Revision |
The constructor shall do it: std::vector< float > array(mat.data);
. But if your mat is not float, but uchar 3 channels, then you should transform it: it before: mat.convertTo(mat, CV_32F);