Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenCV: 3D Matrix on GPU

I was wondering if it is possible to upload a 3-dimensional matrix to the gpu to work with it? I have a sequence of images all having the same resolution (around 100 frames); now I want to upload them to the gpu using OpenCV's .upload function and do a few computations on them.

The simple approach would be to just create a GPuMat for each frame and upload them sequentially but I was wondering if there is a more elegant way.

like image 975
user1356695 Avatar asked Jun 28 '26 08:06

user1356695


1 Answers

Depending upon how your algorithm works, you might be able to simply concatenate the images in one of the existing image dimensions instead of trying to create a "3D" image. For instance, if you had two frames of 640x480 images, make a single 640x960 image as your image to be sent to the GPU.

like image 92
aardvarkk Avatar answered Jun 30 '26 12:06

aardvarkk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!