0

I am currently working on simulating a dvs camera on an input video file. I currently read the video frame by frame and send each frame to GPU to do some calculation on it.

The thing I'm interested in doing is send all the frames ( or atleast as much as there is memory available in GPU ) to GPU first, then handle all the computation.

I am using Mat to store the data and upload it to GPU.

Maybe an array of Mats could be sent to GPU? but I don't know how to do that.

Any help or hint would be appreciated.

talonmies
  • 70,661
  • 34
  • 192
  • 269
arianhf
  • 143
  • 11
  • Is your computation based on opencv's cuda functions or a custom kernel? – aram Apr 09 '18 at 18:55
  • 1
    Take a look here http://answers.opencv.org/question/89050/passing-an-array-of-cvgpumat-to-a-cuda-kernel/ . Also note that OpenCV already supports operations on GPU, so you may not need to create your own CUDA kernel https://opencv.org/platforms/cuda.html . – Ahmed Osama Apr 09 '18 at 19:02
  • I could not get opencv to work with cuda 9.1. seems like it doesn't support GPU computations for the newer versions. and I am trying to learn parallel programming so I want to write it myself. – arianhf Apr 09 '18 at 19:35
  • @Aram It's not based on opencv's cuda functions. I am trying to do it myself. – arianhf Apr 09 '18 at 19:37
  • Then you should use something like this with your data pointers of the mats https://stackoverflow.com/questions/1835537/cuda-allocating-array-of-arrays – aram Apr 10 '18 at 12:31

0 Answers0