Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

First, reshape() does not performs any copy of memory. So if the memory wasn't continuous it will stay this way.

Second, Mat unlike IplImage allocates continuous memory during its construction unless you ask otherwise. So don't worry about that.

Third, if still do not trust Mat to allocate continuous memory for you, you can allocate it yourself and pass it Mat constructor. Don't forget to release it afterwards. I think this is really an overkill but if you insist....