Issue
i'am using Android Studio Trying to Achieve a panorama application i started with an OpenCV sample called pandorica link : https://code.google.com/archive/p/android-opencv-panorama/
i set up every thing and built the project but my fonction Stitch is not found i think that ndk is not working even if it has compiled .so (shared libs) files
JNIEXPORT jint JNICALL Java_com_example_administrateur_cameraapp_MainActivity_Stitch(JNIEnv *env, jobject obj, jobjectArray args)
this is my build.gradle
sourceSets.main {
jniLibs.srcDir 'src/main/libs' //set .so files location to libs
jni.srcDirs = [] //disable automatic ndk-build call
}
// call regular ndk-build(.cmd) script from app directory
task ndkBuild(type: Exec) {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'C:\\\\Android\\\\android-ndk-r11b\\\\ndk-build.cmd', '-C', file('src/main/jni').absolutePath
} else {
commandLine 'C:\\\\Android\\\\android-ndk-r11b\\\\ndk-build', '-C', file('src/main/jni').absolutePath
}
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn ndkBuild
}
this is the error
Cannot resolve corresponding JNI function Java_com_example_administrateur_cameraapp_MainActivity_Stitch
i am using Android version 1.5.1 OpenCV 2.3.1 Gradle 2.8 Ndk r11b
My Goal is to achieve a panorama android application and I choose OpenCV 2.3.1 because opensource project used it
If there is a tutorial of OpenCV 3.0 panorama application, Please Post the link here
Solution
I had the same problem You need to create a JNI folder inside your project and pass the needed libraries there... I had the same problem along with Imgproc.circle\line And solved it by doing that
Answered By - 2D3D
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.