C++;如何在函数中写入opencv的Vect3b指针

C++;如何在函数中写入opencv的Vect3b指针,c++,function,opencv,pointers,vector,C++,Function,Opencv,Pointers,Vector,我有个小问题。我有一个函数,使用一个给定2个Mat指针对象的函数,但我无法写入输出img通道以更新img void convolve5(Mat *inputImg, Mat *outImg, int *kernel5) { int channelvaluepixel = inputImg->at<Vect3b>(x,y)[channel]; // loads of changes happening here outImg->at<Ve

我有个小问题。我有一个函数,使用一个给定2个Mat指针对象的函数,但我无法写入输出img通道以更新img

void convolve5(Mat *inputImg, Mat *outImg, int *kernel5) {
     int channelvaluepixel = inputImg->at<Vect3b>(x,y)[channel];
     // loads of changes happening here
     outImg->at<Vect3b>(x,y)[0] = channelvaluepixel;
}

有人能帮忙吗?

您正在取消对整个表达式outImg->atx,y[0]的引用,而不仅仅是*outImg.atx,y[0]=channelvaluepixel

您正在取消对整个表达式outImg->atx,y[0]的引用,而不仅仅是*outImg.atx,y[0]=channelvaluepixel;不能繁殖;原始代码,即outImg->atx,y[0],适用于我Windows 10,Visual Studio Prof.2017,OpenCV 4.0.0。>由于outImg是一个指针,我无法指向其地址进行更改,我想您可能对成员访问运营商有一些误解->
*outImg->at<Vect3b>(x,y)[0] = channelvaluepixel;
Error: invalid type argument of unary '*' (have 'unsigned char')