Hello guys,
I'm trying to build an application that uses OpenCV SURF (Speeded Up Robust Features) descriptors in order to get same points between 2 images.
I'm using the find_obj.cpp demo which I modified to fit my needs. So let's say i have my jni_part.cpp where I used the find_obj.cpp code and i am able to compile it through the ndk-build command, lib folder is generated and it is correctly placed in the apk file.
Here is the problem: when i try to run the project on my android phone (os version 2.3) i always get this error:
ERROR/AndroidRuntime(3342): java.lang.ExceptionInInitializerError
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load opencv: findLibrary returned null
this is my Android.mk:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OPENCV_CAMERA_MODULES:=off
include ../includeOpenCV.mk
ifeq ("$(wildcard $(OPENCV_MK_PATH))","")
#try to load OpenCV.mk from default install location
include $(TOOLCHAIN_PREBUILT_ROOT)/user/share/OpenCV/OpenCV.mk
else
include $(OPENCV_MK_PATH)
endif
LOCAL_MODULE := opencv
LOCAL_SRC_FILES := jni_part.cpp
LOCAL_LDLIBS += -llog -ldl
include $(BUILD_SHARED_LIBRARY)
and of course in my activity class i have:
static{
System.loadLibrary("opencv");
}
I have uploaded my jni_part.cpp since i don't really know if that is the problem, but i guess not. I know my code there is really ugly since it is a test and maybe it doesn't even work because i couldn't try it. You can see here what i want to achieve:
http://www.youtube.com/watch?v=-TkssDoNJS4Feel free to give me any suggestion to sort things up.
p.s. i have already tried to run the application with both 2.1 and 2.2 os on a real device and i tried even on the emulator but i get always the same error.
Thank you guys, i really hope you can help me.