LOCAL_C_INCLUDES +=/usr/local/include /usr/local/include/opencv2 /home/pi19404/repository/OpenVision/OpenVision # include path for header files for C and C++ applications LOCAL_LDLIBS += -L$(LOCAL_PATH)/./libs/armeabi -llog -Llibs/armeabi-v7a/ LOCAL_LDLIBS += -fPIC -llog -ldl -lm -lz -lm -lc -lgcc -Wl,-rpath,'libs/armeabi-v7a' OPENCV_MODULES3:=core imgproc flann contrib features2d video highgui legacy ml objdetect LOCAL_SHARED_LIBRARIES := $(foreach module,$(OPENCV_LIBS3),opencv_$(module)) # list of dependent 3rd party or external libraries are included in the LOCAL_SHARED_LIBRARY variable LOCAL_SRC_FILES := ImgApp/GesturePoint.cpp ImgApp/UniStrokeGesture.cpp ImgApp/UniStrokeGestureRecognizer.cpp #list of source files to be build as part of the library The preset code uses OpenCV libraries.Copy the attached OpenCV pre-compiled libraries for ARM in the libs/armeabi and libs/armeabi2 directories.īelow are the contents of Android.mk file.This file is like a standard make file containing the include paths,source files,library dependencies etc.Few of the syntaxes are specific to android build and explaination is provided in the comments This will configure the AndroidProject for the native build.Create a jni folder with OpenVision.cpp file and associated Android.mk make fileĬopy the all the C/C++ project files in the jni folder and then proceed to modify the Android.mk file to configure for native build.Ĭreate a directory called OpenVision in the jni directoryĬopy all of the following files in the ImageApp subdirectoryĬopy the file OpenCVCommon.hpp in the Common Subdirectory Select Android Tools -> Add native support.Īnd enter the desired library name as OpenVision The project name is AndroidGesture.Right click on an Android project and The simplest approach to do this is to use the Eclipse IDE.The Eclipse IDE provides features for adding native C/C++ support to an existing Android based project. The library libOpenVision.so has been successfully compiled on the Ubuntu OS and now we proceed with cross compilation of the library for ARM based mobile devices which use the Android OS. The present example consists of files containing following classes Install Android SDK + NDK Plugins from Eclipse update site ĭevelope the code on Desktop Computer and check if you are able to compile it properly without errors.Eclipse -> Window -> Preferences -> Android -> NDK -> set path to the NDK.Eclipse -> Window -> Preferences -> Android -> set path to SDK.Installation and Code Compilationīefore Proceeding make sure that you have all the below software components installed and configured in Eclipse This article describes method to compile C/C++ library for mobile devices which use Android OS.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |