Assume that I have a code which is written in C++ and uses Mat to hold images.
I want to change all Mats to UMat so the application runs on GPU as well on CPU (If I turn off GPU processing by calling ocl::setUseOpenCL(false);)
But I am wondering if I do this, is there any performance changes?
so in summery, if I have a code that uses Mat, if I change all Mats to UMats, is there any performance difference (When not running on GPU)?
Edit1
to clear the scope of question, Let me reword it:
why should not I use uMat instead of Mat assuming I am not using GPU?
When using UMat, opencv utilises Transparent API to use additional hardware attached. So, by turning off GPU processing you shouldn't expect a speedup.