Pointer to image problem
Dear everyone, I faced with an error when using below code:
void init(Mat *mF) {
Mat mm = (Mat_<float>(4, 4) << 1, 1, 1, 2,
2, 1, 0, 1,
1, 0, 2, 1,
3, 0, 0, 1);
*mF = mm;
}
The error opened below line:
inline void Mat::release(){
if( u && CV_XADD(&u->refcount, -1) == 1 )
deallocate();
u = NULL;
datastart = dataend = datalimit = data = 0;
for(int i = 0; i < dims; i++)
size.p[i] = 0;
} Please helpt o explain, and how I can correct it.
please use references, not pointers here.
I want to update a Mat (small size), my idea is: pass a Mat pointer and its values to a function, then the Mat will be updated. How I can do that in a good way? Thank you!
@berak did you delete your answer?
@sturkmen, indeed ! (got some thingswrong there)
just wonder what was the wrong?
Yes I have test program I think it's OK if you do something like this :
of course not like this :