I am working on integrating some OpenCV functionality into an existing application that passes data around with pointers. What I want to do is wrap a Mat around the existing data, use some OpenCV functions, then let the data go when I'm done. However, the program is time-sensitive, and I would like to avoid making any copies of the data.
I see a few options. First, is there anything equivalent to Eigen's Map<arrayxxd> that does exactly what I want? Secondly, can I simply re-assign Mat's ptr, width, and height variables, then put them back when I'm done? Or is there a different option?
Thank you for your help.