Efficient conversion from Mat to GpuMat
Hi,
I am trying to convert Mat to GpuMat so that I can use GPU for processing.
I tried the following two ways:
GpuMat g;
Mat m;
1. g = GpuMat(m) -> takes around 2 ms
2. g.upload(m) -> takes roughly 1 ms.
I have around 10 Mat to be converted to GpuMat - the time just adds up, is there a quick and efficient way to do the conversion?
Thanks.