Ask Your Question

Revision history [back]

how to new Mat

In C++, we can dynamically create pointer like this:

int nCount = 5; float *fBuffer = new float[nCount];

For OenCV, if we want to allocate 5 Mat as well, shall we call

cv::Mat *MatArray = new cv::Mat(Height,width, 32FC3)[nCount] ?

or how can we achieve it?

Also, do we need to call MatArray.Release()?

Thanks