Real-time Stitching using CUDA + OpenCV 3.0

asked 2014-10-08 08:50:47 -0500

KKyang gravatar image

updated 2014-10-11 07:31:30 -0500

Hi, everyone. I'm trying to modify the opencv stitcher class to make it real-time. When using ATI cards (R7 260x) with OpenCL it works every well with 43 fps when stitching 4 HD images, but when I change the cards to GTX 660 with OpenCL its work terribly with only 5 fps. Changing OpenCL declarations to CUDA doesn't help much either.

I then try to change all the UMat to GpuMat to reduce the transfer time between devices. Most of the functions works, but seam finder and exposure compensater don't accept the GpuMat type. Any ideas how I can reduce the transferring time to the minimal? Or is there a better way to achieve real-time stitching?

Thanks!

Update:

I might find the problem. When warping the images directly using cuda::remap doesn't spend much time, but transferring data between CPU and GPU takes lots of time. Directly remap by using OpenCL or CPU doesn't take very long. But seems feeding data into blender used up most of the stitching time. (0.025 sec for one HD images). I can't use openMP's parallel for when feeding images into blender cause the panorama will fail.

edit retag flag offensive close merge delete