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?
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With