【发布时间】:2013-09-04 02:28:52
【问题描述】:
下面是我的函数原型。
void devectorize(Mat &vec,Mat mask,Mat& img);
当我尝试在我的代码中调用此函数时出现以下错误。会是什么原因?
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&)'
【问题讨论】:
-
我重新标记了你的问题。
标签: c++ opencv reference pass-by-reference argument-passing