Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CUDA with opencv for Android

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?

like image 753
2vision2 Avatar asked Jul 09 '13 14:07

2vision2


People also ask

Does OpenCV have CUDA support?

OpenCV GPU module is written using CUDA, therefore it benefits from the CUDA ecosystem. There is a large community, conferences, publications, many tools and libraries developed such as NVIDIA NPP, CUFFT, Thrust. The GPU module is designed as host API extension.

Can I run OpenCV on GPU?

OpenCV library can be used for both CPU and GPU. In my last post, I have shared how to install OpenCV GPU for windows. In this post, I will show you how you can use OpenCV with GPU to optimize your real-time video processing project up to 1000 times faster with just 2 lines of code.

How do I know if OpenCV supports CUDA?

If OpenCV is compiled with CUDA capability, it will return non-zero for getCudaEnabledDeviceCount function (make sure you have CUDA installed). Another very simple way is to try using a GPU function in OpenCV and use try-catch. If an exception is thrown, you haven't compiled it with CUDA.


1 Answers

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

like image 177
kamjagin Avatar answered Oct 06 '22 00:10

kamjagin