Coder Social home page Coder Social logo

opencv-android's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opencv-android's Issues

Crash on mobile phone

Hi, Thanks for this awesome porting .
I tried to run the example opencv-sample on emulator and it works without crash , and I see a ball bouncing.
Now when I export is as .apk and run it on phone , it crash , it says process org.siprop.opemcv has stopped ..etc
Please I stayed 3 days trying to solve it and couldn't .

how can compile it with cygwin

!. OpecnCV can pass in Ubutu,but when work in cygwin,compile error information is
..bin/ld.exe:cannot find -lcxcore.

2.I am so confuse that the following in android.mk

LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl -llog
L$(TARGET_OUT) -lcxcore -lcv -lcvaux -lcvml -lcvhighgui
as NDK document,LOCAL_LDLIBS should link a *.so lib,but the above of OpenCV lib is a static lib.
3.but if I delete the above OpenCV,ndk-build can compile,but show so mang error.
I have try so many idea to solve it,but no any progress,hope someone can help me.

undefined reference

I'm new in NDK and I see this problem

E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvcolor.o): In function icvBGRx2Lab_32f_CnC3R': E:/android-opencv/testOpenCV/jni/cv/src/cvcolor.cpp:1880: undefined reference tocvCbrt'
E:/android-opencv/testOpenCV/jni/cv/src/cvcolor.cpp:1885: undefined reference to cvCbrt' E:/android-opencv/testOpenCV/jni/cv/src/cvcolor.cpp:1891: undefined reference tocvCbrt'
E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvcolor.o): In function icvBGRx2Luv_32f_CnC3R': E:/android-opencv/testOpenCV/jni/cv/src/cvcolor.cpp:2012: undefined reference tocvCbrt'
E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvsurf.o): In function cvExtractSURF': E:/android-opencv/testOpenCV/jni/cv/src/cvsurf.cpp:299: undefined reference tocvMinS'
E:/android-opencv/testOpenCV/jni/cv/src/cvsurf.cpp:384: undefined reference to cvCartToPolar' E:/android-opencv/testOpenCV/jni/cv/src/cvsurf.cpp:408: undefined reference tocvFastArctan'
E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvimgwarp.o): In function cvWarpPerspective': E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:1395: undefined reference tocvInvert'
E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:1446: undefined reference to cvInvert' E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvimgwarp.o): In functioncvWarpAffine':
E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:1122: undefined reference to cvInvert' E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:1123: undefined reference tocvGEMM'
E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvimgwarp.o): In function cvGetAffineTransform': E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:1595: undefined reference tocvSolve'
E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvimgwarp.o): In function cvGetPerspectiveTransform': E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:1534: undefined reference tocvSolve'
E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvimgwarp.o): In function cvLogPolar': E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:2228: undefined reference tocvCartToPolar'
E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:2233: undefined reference to cvLog' E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:2228: undefined reference tocvCartToPolar'
E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:2233: undefined reference to cvLog' E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvtemplmatch.o): In functionicvCrossCorr(void const_, void const_, void_, CvPoint)':
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:119: undefined reference to cvGetOptimalDFTSize' E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:122: undefined reference tocvGetOptimalDFTSize'
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:134: undefined reference to cvGetNumThreads' E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:122: undefined reference tocvGetOptimalDFTSize'
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:184: undefined reference to cvDFT' E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:198: undefined reference tocvGetThreadNum'
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:253: undefined reference to cvDFT' E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:257: undefined reference tocvMulSpectrums'
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:258: undefined reference to cvDFT' E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvtemplmatch.o): In functioncvMatchTemplate':
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:439: undefined reference to cvAvgSdv' E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:430: undefined reference tocvAvg'
collect2: ld returned 1 exit status
make: *_* [/cygdrive/e/android-opencv/testOpenCV/obj/local/armeabi/libopencv.so] Error 1

How to solve this problem.

PS. I use run cygwin in Eclipse to build

Unable to build on Windows

I'm trying to build this on Windows using cygwin with ndk r5 and sdk 2.1/2.2. I have OpenCV 2.2 installed and in PATH as well. I get the following error.

StaticLibrary  : libcvhighgui.a
SharedLibrary  : libopencv.so
E:/dev/android-ndk-r5/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: cannot find - lcxcore
collect2: ld returned 1 exit status
make: *** [/cygdrive/e/code/droid/billmcord/first-push/OpenCV-Android/obj/local/armeabi/libopencv.so] Error 1

simple OpenCVSample failed with segmentation fault

loaded the OpenCVSample using Eclipse (3.5) with ADT plugin 0.9.7, and using NDK-r4, and Android SDK1.6. With the new -r4 system of using "ndk-build", I wasn't sure what to do, so I put all of the jni files and the android.mk file into the jni folder of my project and ran ndk-build (like the new android-ndk-r4 directions tell you to) and the library libopencv.so appeared to build without problem...

I stripped the OpenCVSample code down, so all it does is call cv.findContours() of a Bitmap which I provide (only 50x50 in size) instead of pulling one from a camera. I get the following error:

05-27 19:31:39.696: INFO/DEBUG(31): Build fingerprint: 'generic/sdk/generic/:2.2/FRF42/36942:eng/test-keys'
05-27 19:31:39.706: INFO/DEBUG(31): pid: 17085, tid: 17085 >>> com.meetlocalfish <<<
05-27 19:31:39.706: INFO/DEBUG(31): signal 11 (SIGSEGV), fault addr 00000000
05-27 19:31:39.706: INFO/DEBUG(31): r0 00000001 r1 00000000 r2 80b3c2ec r3 00000000
05-27 19:31:39.706: INFO/DEBUG(31): r4 fffffffb r5 80a313e9 r6 80b0d384 r7 80b0d21c
05-27 19:31:39.736: INFO/DEBUG(31): r8 80b3c2ec r9 4104bc9c 10 4104bc84 fp 00000000
05-27 19:31:39.736: INFO/DEBUG(31): ip 80b3b568 sp bed627b8 lr afd15eeb pc 80a31188 cpsr 60000030
05-27 19:31:40.186: INFO/DEBUG(31): #00 pc 00031188 /data/data/com.meetlocalfish/lib/libopencv.so
05-27 19:31:40.186: INFO/DEBUG(31): #1 pc 0001f3a4 /data/data/com.meetlocalfish/lib/libopencv.so
05-27 19:31:40.208: INFO/DEBUG(31): #2 pc 0001e488 /data/data/com.meetlocalfish/lib/libopencv.so
05-27 19:31:40.301: INFO/DEBUG(31): #3 pc 00013974 /system/lib/libdvm.so
05-27 19:31:40.301: INFO/DEBUG(31): code around pc:
05-27 19:31:40.306: INFO/DEBUG(31): 80a31168 2b02686b 9b08d00d 46411c20 68eb9300

etc, etc...
Maybe, the bitmap is not acceptable, but it is an immutable bitmap, must like the one created by BitmapFactory.decodeByteArray() used in the original OpenCVSample code. I don't know.

I did notice that the JNI code seems to have the following parameters:
Java_org_siprop_opencv_OpenCV_findContours(JNIEnv* env,
jobject thiz,
jint width,
jint height)
whereas the Java code passes:
public native byte[] findContours(int[] data, int w, int h);

which seemed discordant (no array or matrix passed in the JNI code, but it is passed in the Java code), but I don't know too much about JNI (about to learn, lol).

Thanks,
JIm

I want to open jpg or png files but I cannot open them.

In Android, I am making the program comparing with two images like a game 'TheHiddenCatch'.

I make the matching algorithm in OpenCV using the guideline here.

Now, I am porting the source code in Android.

After I select two images, match them.

But I cannot match them except BMP files(like JPG or PNG).

If I try to match JPG or PNG, I receive the error message like this.

11-26 02:05:48.775: INFO/DEBUG(28): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-26 02:05:48.775: INFO/DEBUG(28): Build fingerprint: 'generic/sdk/generic/:2.1-update1/ECLAIR/35983:eng/test-keys'
11-26 02:05:48.775: INFO/DEBUG(28): pid: 247, tid: 247 >>> exam.TheHiddenCatch <<<
11-26 02:05:48.775: INFO/DEBUG(28): signal 11 (SIGSEGV), fault addr 00000028
11-26 02:05:48.775: INFO/DEBUG(28): r0 00000023 r1 beccb53c r2 0b21ceab r3 00000000
11-26 02:05:48.785: INFO/DEBUG(28): r4 80d12bb0 r5 000002b8 r6 4104ba4c r7 00000000
11-26 02:05:48.785: INFO/DEBUG(28): r8 beccb918 r9 4104ba64 10 4104ba4c fp 00000000
11-26 02:05:48.785: INFO/DEBUG(28): ip afbc30c8 sp beccb560 lr afbc1053 pc 80c1c638 cpsr 60000030
11-26 02:05:48.945: INFO/DEBUG(28): #00 pc 0001c638 /data/data/exam.TheHiddenCatch/lib/libFindAll.so
11-26 02:05:48.955: INFO/DEBUG(28): #1 pc 0000f1f4 /system/lib/libdvm.so
11-26 02:05:48.955: INFO/DEBUG(28): #2 pc 00038018 /system/lib/libdvm.so
11-26 02:05:48.955: INFO/DEBUG(28): #3 pc 000316a2 /system/lib/libdvm.so
11-26 02:05:48.955: INFO/DEBUG(28): #4 pc 0003d31c /system/lib/libdvm.so
11-26 02:05:48.975: INFO/DEBUG(28): #5 pc 00013f58 /system/lib/libdvm.so
....
...

I don't know why it happens the signal 11 (SIGSEGV) using JPG or PNG.

If you know them, please tell me how to solve the problem....

Do you have a API??

hi- I'm korean student. so, I can't speak English very well.

Anyway, i'm making the application with OpenCV-andoid library.

but, I can't found OpenCV-andoid API!!

so, i stop to make application. i can't refer to your library.

do you have a library? or do you make a library?

How to manage an image with the library?

Hi,

I tested all examples but they use a remote camera.
I would like to process an image stored in the phone or in the application and I would like to use the internal camera to process the frames.
How to do it?

Cheers

Can't build on Mac OS X

I get this error when running "make APP=opencv":

$ make APP=opencv
Android NDK: Building for application 'opencv'
make: *** No rule to make target cxcore', needed byndk-app-opencv'. Stop.

I am using Mac OS X 10.6.2 with android-ndk-1.5_r1. Any ideas?

I can't use the application in Nexus One

Hi everyone,

Last week, I downloaded the demo from Google Market for my Nexus One but once the software was installed and I tried to execute I saw an exception window. In the past I tested the same APK on my HTC Hero and with this android's release (1.5) I don't have any problem. What is the difference between the release for Android 1.5 and Android 2.1?

I would like to collaborate in the project testing the releases.

VideoEmulation Issues

Hi everyone,

I would like to know whether the VideoEmulation is able to work with the original webcambroadcaster code which is on the following site "http://www.tomgibara.com/android/WebcamBroadcaster.java". Because i have tried to run the original webcambroadster together with the VideoEmulation and i could not get any output from the android emulator.

Could it be some compatibility issues? Or is it something that i could have done wrong?

Thanks in advance

VideoEmulation - Fatal Exception initFaceDetection

(Sorry for my english)

Thanks for all your work...

I try to running de VideoEmulation to test... but the app Crash and Close.
In the LogCat window (Eclipse) i see this:

09-29 21:21:46.533: DEBUG/VideoEmulation(454): initFaceDetect
09-29 21:21:46.533: WARN/dalvikvm(454): No implementation found for native Lmsdark/proto/OpenCV;.initFaceDetection (Ljava/lang/String;)Z
09-29 21:21:46.533: DEBUG/AndroidRuntime(454): Shutting down VM
09-29 21:21:46.533: WARN/dalvikvm(454): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): FATAL EXCEPTION: main
09-29 21:21:46.553: ERROR/AndroidRuntime(454): java.lang.UnsatisfiedLinkError: initFaceDetection
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at msdark.proto.OpenCV.initFaceDetection(Native Method)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at msdark.proto.VideoEmulation.onResume(VideoEmulation.java:112)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1149)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at android.app.Activity.performResume(Activity.java:3823)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3118)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3143)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2684)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at android.os.Handler.dispatchMessage(Handler.java:99)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at android.os.Looper.loop(Looper.java:123)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at android.app.ActivityThread.main(ActivityThread.java:4627)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at java.lang.reflect.Method.invokeNative(Native Method)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at java.lang.reflect.Method.invoke(Method.java:521)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
09-29 21:21:46.553: ERROR/AndroidRuntime(454): at dalvik.system.NativeStart.main(Native Method)

The libopencv.so file is loaded i'm using System.load("/data/data/msdark.proto/libopencv.so"); to load the lib (i have trouble with the original method ).

If i don't wrong. The error means that the application call an inexistent method in native library.
How can i fix that?

Thanks a lot

Error during Load of cascade file

(sorry for my english)

The error is trigger with cvLoad function:

m_cascade = (CvHaarClassifierCascade*)cvLoad(cascade_path);

The Eclipse LogCat View show this:

10-05 19:42:22.496: INFO/DEBUG(566): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-05 19:42:22.496: INFO/DEBUG(566): Build fingerprint: 'generic/sdk/generic/:2.2/FRF91/43546:eng/test-keys'
10-05 19:42:22.496: INFO/DEBUG(566): pid: 1082, tid: 1092 >>> msdark.proto <<<
10-05 19:42:22.496: INFO/DEBUG(566): signal 11 (SIGSEGV), fault addr 00000000
10-05 19:42:22.496: INFO/DEBUG(566): r0 00000001 r1 00000000 r2 80afe968 r3 00000000
10-05 19:42:22.506: INFO/DEBUG(566): r4 fffffffe r5 80a255ad r6 80ae6d64 r7 80ae6c7c
10-05 19:42:22.506: INFO/DEBUG(566): r8 80afe968 r9 00000000 10 00000000 fp 00000007
10-05 19:42:22.506: INFO/DEBUG(566): ip 80afd4d8 sp 453e4ca0 lr afd15eeb pc 80a2534c cpsr 60000030
10-05 19:42:22.666: INFO/DEBUG(566): #00 pc 0002534c /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.676: INFO/DEBUG(566): #1 pc 00025ac8 /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.676: INFO/DEBUG(566): #2 pc 0002aa66 /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.686: INFO/DEBUG(566): #3 pc 00017236 /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.686: INFO/DEBUG(566): #4 pc 00013974 /system/lib/libdvm.so
10-05 19:42:22.696: INFO/DEBUG(566): #5 pc 0003de3c /system/lib/libdvm.so
10-05 19:42:22.696: INFO/DEBUG(566): #6 pc 00037216 /system/lib/libdvm.so
10-05 19:42:22.696: INFO/DEBUG(566): #7 pc 000432ec /system/lib/libdvm.so
10-05 19:42:22.706: INFO/DEBUG(566): #8 pc 00018714 /system/lib/libdvm.so
10-05 19:42:22.706: INFO/DEBUG(566): #9 pc 0001e8c4 /system/lib/libdvm.so
10-05 19:42:22.716: INFO/DEBUG(566): #10 pc 0001d790 /system/lib/libdvm.so
10-05 19:42:22.726: INFO/DEBUG(566): #11 pc 00053eec /system/lib/libdvm.so
10-05 19:42:22.726: INFO/DEBUG(566): #12 pc 00054102 /system/lib/libdvm.so
10-05 19:42:22.736: INFO/DEBUG(566): #13 pc 0004825a /system/lib/libdvm.so
10-05 19:42:22.746: INFO/DEBUG(566): #14 pc 0001103c /system/lib/libc.so
10-05 19:42:22.746: INFO/DEBUG(566): #15 pc 00010b20 /system/lib/libc.so
10-05 19:42:22.746: INFO/DEBUG(566): code around pc:
10-05 19:42:22.766: INFO/DEBUG(566): 80a2532c 2b02686b 9b08d00d 46411c20 68eb9300
10-05 19:42:22.766: INFO/DEBUG(566): 80a2533c 93011c32 1c3b68ad 280047a8 2300d001
10-05 19:42:22.766: INFO/DEBUG(566): 80a2534c b002601b 4690bc04 2000bdf0 ffc6f7ff
10-05 19:42:22.766: INFO/DEBUG(566): 80a2535c 46c0e7f7 00001010 f7ffb510 6800ffa1
10-05 19:42:22.766: INFO/DEBUG(566): 80a2536c 46c0bd10 1c04b510 ff9af7ff 68401c03
10-05 19:42:22.766: INFO/DEBUG(566): code around lr:
10-05 19:42:22.776: INFO/DEBUG(566): afd15ec8 230ed505 21005ec0 f7f72202 89a2ed66
10-05 19:42:22.776: INFO/DEBUG(566): afd15ed8 1c294804 81a04010 5ea0220e f7f71c32
10-05 19:42:22.776: INFO/DEBUG(566): afd15ee8 bd70ecec ffffefff 1c04b510 5ec0230e
10-05 19:42:22.776: INFO/DEBUG(566): afd15ef8 ecd2f7f7 db032800 180b6d21 e0036523
10-05 19:42:22.776: INFO/DEBUG(566): afd15f08 4b0289a2 81a34013 46c0bd10 ffffefff
10-05 19:42:22.786: INFO/DEBUG(566): stack:
10-05 19:42:22.786: INFO/DEBUG(566): 453e4c60 80ae6bc0 /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.786: INFO/DEBUG(566): 453e4c64 0000001f
10-05 19:42:22.786: INFO/DEBUG(566): 453e4c68 80afd408 /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.786: INFO/DEBUG(566): 453e4c6c 80afd408 /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.796: INFO/DEBUG(566): 453e4c70 80ae6c7c /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.796: INFO/DEBUG(566): 453e4c74 80afe968 /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.806: INFO/DEBUG(566): 453e4c78 afd4054c /system/lib/libc.so
10-05 19:42:22.806: INFO/DEBUG(566): 453e4c7c 80a2561b /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.806: INFO/DEBUG(566): 453e4c80 000013c5
10-05 19:42:22.806: INFO/DEBUG(566): 453e4c84 80a2a58b /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.806: INFO/DEBUG(566): 453e4c88 80afe968 /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.806: INFO/DEBUG(566): 453e4c8c fffffffe
10-05 19:42:22.816: INFO/DEBUG(566): 453e4c90 80a255ad /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.816: INFO/DEBUG(566): 453e4c94 80ae6d64 /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.816: INFO/DEBUG(566): 453e4c98 df002777
10-05 19:42:22.816: INFO/DEBUG(566): 453e4c9c e3a070ad
10-05 19:42:22.816: INFO/DEBUG(566): #00 453e4ca0 000013c5
10-05 19:42:22.826: INFO/DEBUG(566): 453e4ca4 00000000
10-05 19:42:22.826: INFO/DEBUG(566): 453e4ca8 00000000
10-05 19:42:22.826: INFO/DEBUG(566): 453e4cac 80afd408 /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.826: INFO/DEBUG(566): 453e4cb0 00000000
10-05 19:42:22.826: INFO/DEBUG(566): 453e4cb4 00000000
10-05 19:42:22.836: INFO/DEBUG(566): 453e4cb8 80afd408 /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.836: INFO/DEBUG(566): 453e4cbc 80a25acd /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:22.836: INFO/DEBUG(566): #1 453e4cc0 000013c5
10-05 19:42:22.836: INFO/DEBUG(566): 453e4cc4 453e4ce0
10-05 19:42:22.836: INFO/DEBUG(566): 453e4cc8 453e5e70
10-05 19:42:22.836: INFO/DEBUG(566): 453e4ccc 453e5d60
10-05 19:42:22.836: INFO/DEBUG(566): 453e4cd0 453e5dd0
10-05 19:42:22.836: INFO/DEBUG(566): 453e4cd4 80a2aa6b /data/data/msdark.proto/lib/libdetector.so
10-05 19:42:24.296: DEBUG/Zygote(33): Process 1082 terminated by signal (11)

I can't find what the problem is... i build the code with crystax ndk and the original one... i have no errors... but i can't make to work...
some idea?

New build instructions for android-ndk-r4

In the BUILD part of your instructions, you indicate running "build/host-setup.sh" and then running "make ...".
With the latest android-ndk-r4, Android has changed to using something called "ndk-build" with associated .mk makefiles. The difference in implementation is probably obvious or trivial to you, but I am rather novice and not fully understanding the exact new procedure. If you could update your Build instructions for -r4 sometime, I would appreciate it.
Thanks!
Jim

OpenCV sample not working on Moto Droid

I am trying to run your OpenCV sample on a Moto Droid. I am having issues with the native findContours function. When this function is called, the app crashes. When the crash happens the log says:

05-16 10:06:24.219: DEBUG/dalvikvm(3404): +++ not scanning '/system/lib/libwebcore.so' for 'findContours' (wrong CL)
05-16 10:06:24.219: DEBUG/dalvikvm(3404): +++ not scanning '/system/lib/libmedia_jni.so' for 'findContours' (wrong CL)
05-16 10:06:24.219: DEBUG/dalvikvm(3404): +++ not scanning '/system/lib/libexif.so' for 'findContours' (wrong CL)
05-16 10:06:24.226: DEBUG/dalvikvm(3404): +++ not scanning '/system/lib/libsrec_jni.so' for 'findContours' (wrong CL)
05-16 10:06:24.367: INFO/DEBUG(991): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-16 10:06:24.375: INFO/DEBUG(991): Build fingerprint: 'verizon/voles/sholes/sholes:2.1-update1/ESE81/29593:user/release-keys'
05-16 10:06:24.375: INFO/DEBUG(991): pid: 3404, tid: 3404 >>> org.siprop.opencv <<<
05-16 10:06:24.375: INFO/DEBUG(991): signal 11 (SIGSEGV), fault addr 00000000
05-16 10:06:24.375: INFO/DEBUG(991): r0 00000001 r1 00000000 r2 80b3dfb4 r3 00000000
05-16 10:06:24.375: INFO/DEBUG(991): r4 fffffffb r5 80a31511 r6 80b0f6a4 r7 80b0f564
05-16 10:06:24.375: INFO/DEBUG(991): r8 80b3dfb4 r9 4186bd78 10 beadba28 fp 4186bd74
05-16 10:06:24.375: INFO/DEBUG(991): ip afe14db5 sp beadb798 lr beadb754 pc 80a312b0 cpsr 60000030
05-16 10:06:24.430: INFO/DEBUG(991): #00 pc 000312b0 /data/data/org.siprop.opencv/lib/libopencv.so
05-16 10:06:24.430: INFO/DEBUG(991): #1 pc 0001f3bc /data/data/org.siprop.opencv/lib/libopencv.so
05-16 10:06:24.437: INFO/DEBUG(991): #2 pc 0001e490 /data/data/org.siprop.opencv/lib/libopencv.so
05-16 10:06:24.437: INFO/DEBUG(991): #3 pc 0000ecb4 /system/lib/libdvm.so
05-16 10:06:24.437: INFO/DEBUG(991): code around pc:
05-16 10:06:24.437: INFO/DEBUG(991): 80a312a0 93011c32 1c3b68ad 280047a8 2300d001
05-16 10:06:24.437: INFO/DEBUG(991): 80a312b0 b002601b 4690bc04 2000bdf0 ffc6f7ff
05-16 10:06:24.437: INFO/DEBUG(991): 80a312c0 46c0e7f7 00001010 f7ffb510 6800ffa1
05-16 10:06:24.437: INFO/DEBUG(991): code around lr:
05-16 10:06:24.437: INFO/DEBUG(991): beadb744 0000001f afe3afd8 afe143b3 80b0f564
05-16 10:06:24.437: INFO/DEBUG(991): beadb754 beadb760 00000001 00000000 80b12b30
05-16 10:06:24.437: INFO/DEBUG(991): beadb764 0000001f 80b3d158 80b0f564 80b3dfb4
05-16 10:06:24.437: INFO/DEBUG(991): stack:
05-16 10:06:24.437: INFO/DEBUG(991): beadb758 00000001
05-16 10:06:24.437: INFO/DEBUG(991): beadb75c 00000000
05-16 10:06:24.437: INFO/DEBUG(991): beadb760 80b12b30 /data/data/org.siprop.opencv/lib/libopencv.so
05-16 10:06:24.437: INFO/DEBUG(991): beadb764 0000001f
05-16 10:06:24.437: INFO/DEBUG(991): beadb768 80b3d158 /data/data/org.siprop.opencv/lib/libopencv.so
05-16 10:06:24.437: INFO/DEBUG(991): beadb76c 80b0f564 /data/data/org.siprop.opencv/lib/libopencv.so
05-16 10:06:24.445: INFO/DEBUG(991): beadb770 80b3dfb4 /data/data/org.siprop.opencv/lib/libopencv.so
05-16 10:06:24.445: INFO/DEBUG(991): beadb774 80a315ab /data/data/org.siprop.opencv/lib/libopencv.so
05-16 10:06:24.445: INFO/DEBUG(991): beadb778 000005ad
05-16 10:06:24.445: INFO/DEBUG(991): beadb77c 418ab254 /dev/ashmem/dalvik-LinearAlloc (deleted)
05-16 10:06:24.445: INFO/DEBUG(991): beadb780 80b3dfb4 /data/data/org.siprop.opencv/lib/libopencv.so
05-16 10:06:24.445: INFO/DEBUG(991): beadb784 fffffffb
05-16 10:06:24.445: INFO/DEBUG(991): beadb788 80a31511 /data/data/org.siprop.opencv/lib/libopencv.so
05-16 10:06:24.445: INFO/DEBUG(991): beadb78c 80b0f6a4 /data/data/org.siprop.opencv/lib/libopencv.so
05-16 10:06:24.445: INFO/DEBUG(991): beadb790 df002777
05-16 10:06:24.445: INFO/DEBUG(991): beadb794 e3a070ad
05-16 10:06:24.445: INFO/DEBUG(991): #00 beadb798 000005ad
05-16 10:06:24.445: INFO/DEBUG(991): beadb79c 00000000
05-16 10:06:24.445: INFO/DEBUG(991): beadb7a0 beadb8c4 [stack]
05-16 10:06:24.445: INFO/DEBUG(991): beadb7a4 beadb87c [stack]
05-16 10:06:24.445: INFO/DEBUG(991): beadb7a8 80b45280 /data/data/org.siprop.opencv/lib/libopencv.so
05-16 10:06:24.445: INFO/DEBUG(991): beadb7ac 0000aa98 [heap]
05-16 10:06:24.445: INFO/DEBUG(991): beadb7b0 beadb87c [stack]
05-16 10:06:24.445: INFO/DEBUG(991): beadb7b4 80a1f3c1 /data/data/org.siprop.opencv/lib/libopencv.so
05-16 10:06:24.445: INFO/DEBUG(991): #1 beadb7b8 000005ad
05-16 10:06:24.445: INFO/DEBUG(991): beadb7bc 447c4058 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
05-16 10:06:24.445: INFO/DEBUG(991): beadb7c0 80b3d158 /data/data/org.siprop.opencv/lib/libopencv.so
05-16 10:06:24.445: INFO/DEBUG(991): beadb7c4 80a1e495 /data/data/org.siprop.opencv/lib/libopencv.so
05-16 10:06:24.773: DEBUG/Zygote(993): Process 3404 terminated by signal (11)
05-16 10:06:24.781: INFO/WindowManager(1033): WIN DEATH: Window{4473abb0 SurfaceView paused=false}
05-16 10:06:24.781: INFO/WindowManager(1033): WIN DEATH: Window{44687f60 org.siprop.opencv/org.siprop.opencv.OpenCVSample paused=false}

I also tried creating a separate project and call the findContours function, and I get a No JNI_onLoad found.

VideoEmulation - Don't show image

(Sorry for my english)
I finally run the VideoEmulation app.
I run WebCamBroadcaster on OSX (using QTVideoCapture).
When i run the app on the emulator LogCat shows:

09-30 11:32:51.502: INFO/ActivityManager(58): Displayed activity msdark.proto/.VideoEmulation: 2702 ms (total 2702 ms)
09-30 11:32:51.502: INFO/ActivityManager(58): [ 09-30 11:32:52.233 531:0x219 S/CVJNI ]
09-30 11:32:51.502: INFO/ActivityManager(58): Total Time to cvHaarDetectObjects in findSingleFace: 0.695374
09-30 11:32:51.502: INFO/ActivityManager(58): [ 09-30 11:32:52.233 531:0x219 S/CVJNI ]
09-30 11:32:51.502: INFO/ActivityManager(58): FACES_DETECTED 0
09-30 11:32:51.502: INFO/ActivityManager(58): [ 09-30 11:32:52.233 531:0x219 S/CVJNI ]
09-30 11:32:51.502: INFO/ActivityManager(58): Total Time to findSingleFace: 0.984898
09-30 11:32:52.233: DEBUG/VideoEmulation(531): No faces were detected
09-30 11:32:52.233: DEBUG/VideoEmulation(531): [ 09-30 11:32:52.233 531:0x219 S/CVJNI ]
09-30 11:32:52.233: DEBUG/VideoEmulation(531): fileStep*height + headerSize=270054
09-30 11:32:52.263: WARN/dalvikvm(531): JNI WARNING: method declared to return '[B' returned '[Z'
09-30 11:32:52.263: WARN/dalvikvm(531): failed in Lmsdark/proto/OpenCV;.getSourceImage
09-30 11:32:52.273: INFO/dalvikvm(531): "Thread-8" prio=5 tid=7 RUNNABLE
09-30 11:32:52.273: INFO/dalvikvm(531): | group="main" sCount=0 dsCount=0 s=N obj=0x43e529f8 self=0x2870d8
09-30 11:32:52.273: INFO/dalvikvm(531): | sysTid=537 nice=0 sched=0/0 cgrp=default handle=2322232
09-30 11:32:52.273: INFO/dalvikvm(531): | schedstat=( 798459080 399601037 99 )
09-30 11:32:52.273: INFO/dalvikvm(531): at msdark.proto.OpenCV.getSourceImage(Native Method)
09-30 11:32:52.283: INFO/dalvikvm(531): at msdark.proto.VideoEmulation$1.run(VideoEmulation.java:226)
09-30 11:32:52.283: ERROR/dalvikvm(531): VM aborting

And nothing is displayed in the emulator screen.

Segmentation fault in VideoEmulation

Firstly, I'd like to commend Bill and Noritsuna on the amazing job they've done in porting OpenCV to Android. Compiling the library was surprisingly simple and all-in-all it's a great achievement.

I have been running the VideoEmulation example (using the Java implementation of SocketCamera) on the emulator, and am encountering a segmentation fault at VideoEmulation.java:226:

data = mOpenCV.getSourceImage();

LogCat first warns me of a mismatch between JNI and Java:

WARN/dalvikvm(29093): JNI WARNING: method declared to return '[B' returned '[Z'
              failed in Lorg/siprop/opencv/OpenCV;.getSourceImage ('[B' not found)

I took a look at the C declaration and JNI declaration, and the former, [Z, is a boolean array while the latter, [B is a byte array.

A stack trace of org.siprop.opencv.OpenCV.getSourceImage(Native Method) is outputted and the VM instantly aborts.

What have I done wrong here? Is my library somehow not compiled correctly?

Current structure will not work on latest Android NDK r4

The current structure of this project will not work directly with the latest Android NDK r4. What I did is to first create an Android project from eclipse then from the root of the project, create a folder named jni then put all files of OpenCV-Android inside jni. Then on command line, execute the new /ndk-build on the root of the project to build OpenCV-Android.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.