Efficient conversion from Mat to GpuMat

asked 2015-04-16 11:00:33 -0500

littlie gravatar image

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.

edit retag flag offensive close merge delete