Animate two images using gpuMat & OpenCV 3.1 [closed]

asked 2016-02-09 16:54:22 -0500

AlBw gravatar image

I tried googling, couldn't find anything useful on the subject.

I am trying to draw two images on screen with one effectively replacing the other, with the new image moving in from left compressing the already displayed image on the screen. Thus, the first image is drawn fullscreen to start with and then it will be drawn resized and shrunk progressively as the second one moves in from the left with the right part of the second image visible at first, finally drawn full screen.

I am having hard time figuring out which operations to perform to manipulate the two gpuMat objects using CUDA and if I require a custom CUDA kernel to do this and if this can only be done using Mat. I do require this to be hardware accelerated, as the Mat version I have come up with which uses<vec3b> and Mat.Resize functions to achieve the animation effect, takes about 132 seconds !

Any help would be highly appreciated.

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by StevenPuttemans
close date 2016-02-11 04:32:40.316616



are you sure, you want opencv to do this, not opengl ?

berak gravatar imageberak ( 2016-02-09 22:02:38 -0500 )edit

I do not OpenGL, so I am not certain if I would be able to manipulate images that well in OpenGL. Soon after posting my question, I decided to read up on OpenGL but, havrn't been able to figure out if that would be the right choice. Perhaps, I should keep readinga bit more.

I f you are familiar with it, please let me know if it would be a better option than OpenCV.


AlBw gravatar imageAlBw ( 2016-02-10 00:53:21 -0500 )edit

I think the comment of @berak is quite to the point. OpenCV is a vision based analysis library. What you are looking for are animations, which is something completely different. You are in the wrong place here I am afraid...

StevenPuttemans gravatar imageStevenPuttemans ( 2016-02-10 06:01:07 -0500 )edit

Thank you both for your input. I have decided to go for OpenGL. It does have a sharp learning curve, but not so much as to deter me away from it.

AlBw gravatar imageAlBw ( 2016-02-10 22:48:19 -0500 )edit