I have a pointer to image:
IplImage *img;
which has been converted to Mat
Mat mt(img);
Then, the Mat
is sent to a function that gets a reference to Mat
as input void f(Mat &m);
f(mt);
Now I want to copy back the Mat
data to the original image.
Do you have any suggestion?
Best Ali
Mat mt(img)
does not do any copying of the imagedata, so you don't have to do anything, as long as you don't do an operation which reallocates (eg. assign mt to an independent other Mat). – Barney Szabolcs