due to my current work with OpenVino I have to use OpenCV. I have to convert a std::vector to a cv::Mat-array. My exemplaric code looks like this:

    std::vector<float> inputvector(10*10,1.1111);
    cv::Mat image = cv::Mat(10,10,CV_32FC1);

    for(int i=0;i<10;i++)
    {
        for (int j=0;j<10;j++)
        {
            image.at<float>(i,j) = inputvector.at(10*i+j);
        }
    }

Now I have to wrap my data by Blob::Ptr without allocation of new memory:

    Blob::Ptr imgBlob = wrapMat2Blob(image);

For the last line above I get the following error message from OpenVINO inference engine:

    Doesn't support conversion from not dense cv::Mat

I do not understand this as my 10*10 array holds the 1.1111-value in every position. Can somebody explain that? Thanks!

0 Answers