OpenCV for Android + Unity3D

asked 2014-07-21 04:54:19 -0500

MartinArroyo gravatar image


I am trying to do a project using OpenCV and Unity3D using Android as platform. So far I have integrated Android with Unity, exporting the Android code as .jar and calling it from the Unity scripts, but when it comes to add some OpenCV functionality, I seem unable to do it, since I can't link the library to the .jar file. Do you have any tutorial or other resource that can help me with this? Thanks in advance!

edit retag flag offensive close merge delete


I have been stuck on this problem for weeks. I managed to export a .so library that reads native code (C++ JNI) from Android Studio and read it from a Unity script, using the .jar wrapper. This is done by adding an AndroidManifest.xml file, the AndroidPluginForUnity (extends UnityPlayerActivity in .java file) and the .so library on the Assets/Plugins/Android folder of Unity. But when I try to load OpenCV on the Java part of the android app it fails to load the library, even if I copy all the libopencv_*.a files and to the same Unity folder.

JakeOPJ gravatar imageJakeOPJ ( 2016-05-16 03:50:13 -0500 )edit