I'm developing an Android application in java, that calls a function in a native c library. The native function requires a pointer to an Opencv Mat type so I need to be able to create a Opencv Mat type in my Java application to pass to the native library.
I'm using Android Studio and I've added the 'opencv library' .jar file to my project's libs folder. So I can import the required Opencv modules and create an Opencv Mat type/access its functions. The problem is at runtime I'm getting the following error:
java.lang.NoClassDefFoundError: org.opencv.core.Mat
I've read that the Opencv .jar file is just a wrapper around native functionality and the application needs 'the native library'. How do I find/add this? What do I need to add to my project so that the Application can find the Opencv Mat class definition at runtime? I only want to use the OpenCV Mat type and nothing else.
I've read tutorials on setting up OpenCV Android, but these require installing the OpenCV Manager App on the Android device but this could be a problem for me because I won't have access to the devices where my app will be installed and the OpenCV Manager App won't be installed on these devices. Instead, is there just an '.so' library that I can add to my Android Studio project which will get bundled with my project and allow the app to find the required Mat class at runtime, which is all I need?
Thanks in advance.