to include in an android project -
-just include the generated android-opencv.mk in you android ndk project
+just include the generated android-opencv.mk in you android ndk project
+(in an Android.mk file)
with:
include android-opencv.mk
-android-opencv
+android-jni
this is an example of an android library project that has some reusable
code that exposes part of OpenCV to android. In particular this provides a
native camera interface for loading live video frames from the android camera
into native opencv functions(as cv::Mat's)
-to build make sure you have swig and the crystax ndk in your path
+pre-reqs:
+* build the opencv/android libraries - up one directory
+* you need swig in you path for android-jni
+ on ubuntu - sudo apt-get install swig
+ others: http://www.swig.org/
+
+to build:
make
that should work... If it doesn't make sure to edit the generated local.env.mk
-the key variable
+to reflect your machine's setup
-more later on how to build actual project for android
- - see the code.google.com/p/android-opencv for details on this
+see the sample for how to use this in your own projects
}
- @Override
+ //@Override
public void process(int idx, image_pool pool, long timestamp,
NativeProcessor nativeProcessor) {
if(lock.tryLock()){
-L$(OPENCV_BUILD_ROOT)/obj/$(ARMOBJS) -L$(OPENCV_BUILD_ROOT)/bin/ndk/$(ARMOBJS) \
-L$(OPENCV_BUILD_ROOT)/bin/ndk/$(ARMOBJS_V7A)
-ANDROID_OPENCV_LIB_DIRS := -L$(OPENCV_ROOT)/android/android-jni/obj/$(ARMOBJS_V7A) \
- -L$(OPENCV_ROOT)/android/android-jni/obj/$(ARMOBJS) \
- -L$(OPENCV_ROOT)/android/android-jni/bin/ndk/$(ARMOBJS_V7A) \
- -L$(OPENCV_ROOT)/android/android-jni/bin/ndk/$(ARMOBJS)
+ANDROID_OPENCV_LIB_DIRS := -L$(OPENCV_ROOT)/android/android-jni/libs/armeabi-v7a \
+ -L$(OPENCV_ROOT)/android/android-jni/libs/armeabi
#order of linking very important ---- may have stuff out of order here, but
#important that modules that are more dependent come first...