Real Time Image Processing in Android Studio

asked 2018-02-07 15:38:15 -0600

updated 2018-02-07 18:40:16 -0600

Tetragramm gravatar image

I am trying to call OpenCV library to do image processing in real time for a java camera application. below is the error log. Could this be a problem with my CMakeLists.txt file? Note that the program was working before I added 2 functions to the native-lib.cpp file.

C:/Users/Akira/AndroidStudioProjects/OpencvCamera2/app/src/main/jniLibs/armeabi-v7a/libopencv_java3.so -llog -latomic -lm "C:/Android/android-sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86_64/libgnustl_static.a" && cd ."

15:19:00.659 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] C:/Android/android-sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/windows-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin\ld: error: C:/Users/Akira/AndroidStudioProjects/OpencvCamera2/app/src/main/jniLibs/armeabi-v7a/libopencv_java3.so: incompatible target

15:19:00.659 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] C:\Users\Akira\Documents\Academic\Spring 2018 Courses\CS 309\OpenCVTest\OpencvCamera2\app\src\main\cpp/native-lib.cpp:27: error: undefined reference to 'cv::FastFeatureDetector::create(int, bool, int)'

15:19:00.659 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] C:\Users\Akira\Documents\Academic\Spring 2018 Courses\CS 309\OpenCVTest\OpencvCamera2\app\src\main\cpp/native-lib.cpp:28: error: undefined reference to 'cv::noArray()'

15:19:00.659 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] C:\Users\Akira\Documents\Academic\Spring 2018 Courses\CS 309\OpenCVTest\OpencvCamera2\app\src\main\cpp/native-lib.cpp:31: error: undefined reference to 'cv::circle(cv::_InputOutputArray const&, cv::Point_<int>, int, cv::Scalar_<double> const&, int, int, int)'

15:19:00.659 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] C:\Users\Akira\Documents\Academic\Spring 2018 Courses\CS 309\OpenCVTest\OpencvCamera2\app\src\main\cpp/native-lib.cpp:43: error: undefined reference to 'cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)'

15:19:00.659 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] C:\Users\Akira\Documents\Academic\Spring 2018 Courses\CS 309\OpenCVTest\OpencvCamera2\app\src\main\cpp/native-lib.cpp:46: error: undefined reference to 'cv::equalizeHist(cv::_InputArray const&, cv::_OutputArray const&)'

15:19:00.659 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] C:\Users\Akira\Documents\Academic\Spring 2018 Courses\CS 309\OpenCVTest\OpencvCamera2\app\src\main\cpp/native-lib.cpp:51: error: undefined reference to 'cv::Mat::convertTo(cv::_OutputArray const&, int, double, double) const'

15:19:00.659 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] C:/opencv-3.2.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include\opencv2/core/mat.inl.hpp:592: error: undefined reference to 'cv::fastFree(void*)'

15:19:00.659 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] C:/opencv-3.2.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include\opencv2/core/mat.inl.hpp:704: error: undefined reference to 'cv::Mat::deallocate()'

Tetragramm Edit: Snipped the giant wall of log and added some spaces. I think I kept the important bits.

edit retag flag offensive close merge delete

Comments

This error has happened when JNI have not including OpenCV lib.

monxarat gravatar imagemonxarat ( 2018-09-04 11:49:04 -0600 )edit