The below is my function prototype.
void devectorize(Mat &vec,Mat mask,Mat& img);
I am getting the below error when I try to call this function in my code. What would be the reason?
Mat V;
for(int i=0;i<V.cols;i++)
{
devectorize(V.col(i),mask,E_img); //Error in this line
}
error: invalid initialization of non-const reference of type 'cv::Mat&' from an rvalue of type 'cv::Mat' utils.h:11:6: error: in passing argument 1 of 'void devectorize(cv::Mat&, cv::Mat, cv::Mat&)'