Ask Your Question

Lee's profile - activity

2013-05-11 07:09:03 -0500 asked a question using ndk r8e with Opencv2.4.5 problem

Hi, I'm trying to use opencv2.4.5 library in my project. As it is mentioned here But when i compile my project i get this warming, and i can't use opencv function any more in java parts.

C:/Development/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/pre‌​built/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-lin‌​ux-androideabi/bin/ld.exe: 
warning: hidden symbol '__aeabi_atexit' in C:/Development/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/li‌​bgnustl_static.a(atexit_arm.o) 
is referenced by DSO ./obj/local/armeabi/libQCAR.so

I have changed the android.mk file to use opencv function in the jni part :

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := QCAR-prebuilt
LOCAL_SRC_FILES = ../../../build/lib/$(TARGET_ARCH_ABI)/libQCAR.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../build/include
include $(PREBUILT_SHARED_LIBRARY)

 include $(CLEAR_VARS)
 LOCAL_PRELINK_MODULE := false
 OPENCV_LIB_TYPE:=STATIC
 include $(LOCAL_PATH)/../../../OpenCV-2.4.5-android-sdk/sdk/native/jni/OpenCV.mk
 LOCAL_MODULE := ImageTargets
 USE_OPENGL_ES_1_1 := false
 ifeq ($(USE_OPENGL_ES_1_1), true)
 OPENGLES_LIB  := -lGLESv1_CM
 OPENGLES_DEF  := -DUSE_OPENGL_ES_1_1
 else
 OPENGLES_LIB  := -lGLESv2
 OPENGLES_DEF  := -DUSE_OPENGL_ES_2_0
 endif

LOCAL_CFLAGS := -Wno-write-strings -Wno-psabi $(OPENGLES_DEF)
LOCAL_LDLIBS += \
-llog $(OPENGLES_LIB)
LOCAL_SHARED_LIBRARIES += QCAR-prebuilt
LOCAL_SRC_FILES := ImageTargets.cpp SampleUtils.cpp Texture.cpp SampleMath.cpp 
LOCAL_ARM_MODE := arm
include $(BUILD_SHARED_LIBRARY)

I still can't figure out the problem.Any idea?

2013-05-08 08:05:39 -0500 commented answer use opencv as static library

Now i 'm using opencv2.4.5,so that i don't have problems with OPENCV_LIB_TYPE:=STATIC.But i still can't link opencv library to my project.PS: my project use another library and i want to link the two librairies to be used in the same file.Do you have any idea how to do that?

2013-05-07 09:01:45 -0500 commented answer use opencv as static library

thank you i'll give it a try

2013-05-07 07:25:21 -0500 asked a question use opencv as static library

Hi, I'm trying to use opencv library as static OPENCV_LIB_TYPE:=STATIC, but i always get this error:

E:\android-ndk-r8\ndk-build.cmd all 
Android NDK: Trying to define local module 'opencv_contrib' in jni/Android.mk.    
E:/android-ndk-r8/build/core/build-module.mk:34: *** Android NDK: Aborting.    .  Stop.
Android NDK: But this module was already defined by jni/Android.mk.
2013-04-25 11:08:58 -0500 asked a question goodFeatureToTrack

Hi i'm trying to implement The goodFeautureToTrack function in java :

Imgproc.goodFeaturesToTrack(eyeRegion,corners,4,0.01,5.0);

But it always crashes there.I verified that may eyeRegion is not empty and i declared corners as global variable :

public MatOfPoint cornersA = new MatOfPoint();

Is it a problem on the java wrapper of opencv? I used the same function in C++ and it works fine but in java it always crashes.

2013-04-23 09:29:43 -0500 asked a question cvProjectPoints2 :ImagePoints units

Hi i used cvProjectPoints2 function to do the projection of a 3D points into 2D points.Now i get the 2D imagePoints(for example:image1.x=-663.450623 and image1.y=101.231941), and i wonder,on which units it's expressed: px or mm? How can i check if the results are raisonnable or not. Thank you in advance.

2013-04-13 11:26:32 -0500 received badge  Editor (source)
2013-04-13 11:22:11 -0500 received badge  Student (source)
2013-04-13 11:15:23 -0500 asked a question detectMultiScale in JNI

hi i tried to use cascade.detectMultiScale(gray, faces, 1.2, 3);in my java native code. But i always get faces empty.

vector<Rect> faces;
std::string str;
GetJStringContent(jenv,cascadeName,str);
cascade.load(str);
 if (cascade.empty())
  LOGD("null");
  Mat gray;
   cvtColor(*pframe, gray, CV_BGR2GRAY);
 cascade.detectMultiScale(gray, faces, 1.2, 3);
 if (faces.empty())
 LOGD("faces empty");

Can i use detectMultiScale function in the native part?any idea why i always get empty faces? thank you in advance