Reputation: 5023
Is it possible to build CUDA based opencv code in Android-Opencv?
My intention is to build a Opencv project with CUDA enabled in Android opencv?
Have anyone tried it? I googled and found no clue on it?
Upvotes: 9
Views: 5750
Reputation: 2454
Yes, the tegra SDK has bundled opencv with a bunch of samples demonstrating the speed ups.
Here is a tutorial for using cuda accelerated opencv:
http://docs.nvidia.com/gameworks/content/technologies/mobile/opencv_tutorial_cuda.htm
I have tested these demo apps on my Tegra powered android device. The samples have a toggle button to see the difference between with and without acceleration.
Upvotes: 1
Reputation: 424
Though this question has been long ago accepted as answered I would like to add a link to an Nvidia webpage where they give further information on the topic, as CUDA can actually be implemented in some Android devices with the Tegra K1 and linux x64 if I am not wrong.
https://developer.nvidia.com/tegra-android-development-pack
Upvotes: 1
Reputation: 12121
CUDA isn't supported in Android and the Google team is leaning toward Renderscript to abstract away the issues of high performance (GPU) compute on mobile devices given the multiple vendors (NVidia, Imagination, Qualcomm, Intel, Samsung) they have to deal with. They had a presentation covering Renderscript at the 2013 Google I/O and covered their rational.
https://developers.google.com/events/io/sessions/331954522
Given that only one device allows Renderscript on the GPU (Nexus 10) at some point someone might port OpenCV to Renderscript but I'm not aware any complete projects.
Upvotes: 6
Reputation: 3654
OpenCV doesn't support CUDA for Android because CUDA is not supported by any android device yet. CUDA support might be coming with Tegra 5 (The closest I've seen to CUDA on an embedded or ARM platform is NVIDIA's demo development board Kayla (https://developer.nvidia.com/content/kayla-platform).
But if what you want is to optimise for existing platforms you can make good use of current Tegra optimisations. Take a look at:
http://docs.nvidia.com/tegra/data/How_to_Use_OpenCV_for_Tegra.html
Upvotes: 9