Ask Your Question

Revision history [back]

It should be:

cv::Mat mat = cv::imread(fileName, cv::IMREAD_GRAYSCALE);
mat.convertTo(mat,CV_32F);
std::vector<float> array((float*)mat.data, (float*)mat.data + mat.rows * mat.cols);

It should be:

cv::Mat mat = cv::imread(fileName, cv::IMREAD_GRAYSCALE);
mat.convertTo(mat,CV_32F);
std::vector<float> array((float*)mat.data, array**((float*)mat.data, (float*)mat.data + mat.rows * mat.cols);
mat.cols);**

It should be:

cv::Mat mat = cv::imread(fileName, cv::IMREAD_GRAYSCALE);
mat.convertTo(mat,CV_32F);
std::vector<float> array**((float*)mat.data, array((float*)mat.data, (float*)mat.data + mat.rows * mat.cols);**
mat.cols);