I am trying to implement a performance upgrade to the project of my company. The project depends on OpenCV and recently I have successfully upgraded to OpenCV 3.1 to use UMat. Though I cant find a complete tutorial on it except basic operations. So I am stuck at the following:
Mat m (width, height, type, someData, step);
cv::UMat * ptr = new cv::UMat (width, height, type);
//dont ask me why the hell we are using a pointer to the smart mat object (my project leader insists)
This doesnt work
ptr->setTo (m);
Neither does this:
m.copyTo(*ptr);
These cause an exception.
ptr=&m.getUMat(cv::ACCESS_RW);
And this one results with a two dimensional mat with 0 rows and 0 cols... Need help. Thanks in advance!!!!