OpenCV Android with nonfree package (SURF) -
i'm trying make app can detect similarity in pictures in android. i'm trying opencv , surffeaturedetector
. in opencv it's not package nonfree
, i'm trying go according tutorial https://sites.google.com/site/wghsite/technical-notes/sift_surf_opencv_android i'm getting problem:
description resource path location type make: * [obj/local/armeabi-v7a/libmixed_sample.so] error 1 appname c/c++
problem recipe target `obj/local/armeabi-v7a/libmixed_sample.so' failed appname line 588, external location: c:\nvpack\android-ndk-r9d\build\core\build-binary.mk c/c++
problem undefined reference 'cv::surf::surf(double, int, int, bool, bool)' appname line 54, external location: c:\nvpack\android-ndk-r9d\toolchains\arm-linux-androideabi-4.6\prebuilt\windows\arm-linux-androideabi\bin\ld.exe: .\obj\local\armeabi-v7a\objs-debug\mixed_sample\jni_part.o: in function java_sk_appname_myopencvactivity_mojaskuska:jni\jni_part.cpp c/c++
problem undefined reference 'vtt cv::surf' appname line 107, external location: c:\nvpack\android-ndk-r9d\toolchains\arm-linux-androideabi-4.6\prebuilt\windows\arm-linux-androideabi\bin\ld.exe: .\obj\local\armeabi-v7a\objs-debug\mixed_sample\jni_part.o: in function cv::surf::~surf():sdk\native\jni\include\opencv2\nonfree\features2d.hpp c/c++
problem undefined reference 'vtable cv::surf' appname line 107, external location: c:\nvpack\android-ndk-r9d\toolchains\arm-linux-androideabi-4.6\prebuilt\windows\arm-linux-androideabi\bin\ld.exe: .\obj\local\armeabi-v7a\objs-debug\mixed_sample\jni_part.o: in function cv::surf::~surf():sdk\native\jni\include\opencv2\nonfree\features2d.hpp c/c++ problem
i'm desperate, i'm trying 3 days make work lot of tutorials nothing working. android.mk:
local_path := $(call my-dir) include $(clear_vars) opencv_camera_modules:=on opencv_install_modules:=on #include ./sdk/native/jni/opencv-tegra3.mk include ./sdk/native/jni/opencv.mk local_module := mixed_sample local_src_files := jni_part.cpp local_ldlibs += -llog -ldl include $(build_shared_library) #pridane include $(clear_vars) local_module := nonfree_prebuilt local_src_files := libnonfree.so include $(prebuilt_shared_library) include $(clear_vars) local_module := opencv_java_prebuilt local_src_files := libopencv_java.so include $(prebuilt_shared_library)
i have no idea if have inserted libraries - in /libs/armeabi-v7a there builded nonfree libraries. when import in jni_part.cpp (where want use surf) #include <opencv2/nonfree/features2d.hpp>
, it's ok without erros. please, me, if give me advice great. thank you.
the main problem android.mk.
it wasn't possible add 2 local_src_files (i don't know why, in i'm noob).
so final version:
local_path := $(call my-dir) include $(clear_vars) opencv_camera_modules:=on opencv_install_modules:=on include ./sdk/native/jni/opencv.mk local_module := mixed_sample local_src_files := jni_part.cpp \ nonfree_init.cpp \ precomp.cpp \ sift.cpp \ surf.cpp local_ldlibs += -llog -ldl include $(build_shared_library) local_c_includes:= ./sdk/native/jni/include local_module := nonfree local_cflags := -werror -o3 -ffast-math local_ldlibs += -llog
it weird problem, seems work fine.
Comments
Post a Comment