2

我正在尝试运行从http://code.google.com/p/android-anpr/source/下载的 ANPR 项目。

当我尝试执行它时,应用程序正在立即关闭。

我试图调试它,但看起来问题来自NativeGraphics.yuvToRGB(data, preview.cs.width, preview.cs.height);,我无法弄清楚究竟是为什么。

如果有人可以花一些时间尝试运行它并与我讨论错误,那将是非常棒的。在我看来,有一些缺失的库或错误的实现。

4

3 回答 3

0

您可能想查看 OpenALPR ( http://www.openalpr.com )。它应该在 NDK 下编译,并且会给你更准确的读数。它可能也快一点。

于 2014-01-16T16:25:03.613 回答
0

我遇到了类似的麻烦;顺便说一句,日志中有信息,但它没有显示为错误,也没有显示为与应用程序相关..你真的需要注意。对我来说,简短的版本是这样的:其中有一些汇编代码graphics_core.cpp要求您拥有支持 NEON 的 ARM 内核。日志消息说我的是,但SIGSEV在那里某处发生了,所以我不相信汇编代码是正确的(似乎正在读取它不拥有的内存)。值得庆幸的是,有一个简单的方法可以解决这个问题:GraphicsCore :: yuvToRGB替换:

#ifdef __ARM_NEON__

和:

#if 0

else并且将使用分支中的代码。我还没有让它正确识别任何车牌,但它根本无法识别我所在地区的车牌,所以我不会进一步研究它。

顺便说一句,日志消息看起来像这样:

01-08 11:18:29.223 32753-327/? I/intelligence_info:GraphicsCore::yuvToRGB
01-08 11:18:29.223 32753-327/? I/intelligence_info:霓虹灯支持-好的/ armv7:2.6.29-g582a0f5 #38 / 默认:2.6.29-00261-g0097074-dirty #20 / armv5:2.6.29-g582a0f5 digit@lulu #37
01-08 11:18:29.223 32753-327/? I/intelligence_info:灰度图像::宽度为1920;高度为1080;步幅为 7680;格式为 1;标志为 0
01-08 11:18:29.223 32753-327/? A/libc:致命信号 11 (SIGSEGV) at 0x00000000 (code=1), thread 327 (Thread-2146)
01-08 11:18:29.227 32753-327/? A/libc:在 debugger_signal_handler 中向 pid:32753 发送停止信号
01-08 11:18:29.230 2529-2529/? I/DEBUG:handle_request(15)
01-08 11:18:29.230 2529-2529/? I/DEBUG:检查进程 32753 名称:om.intelligency
01-08 11:18:29.230 2529-2529/? I/DEBUG: BOOM: pid=32753 uid=10062 gid=10062 tid=327
01-08 11:18:29.232 2529-2529/? I/DEBUG: [OnPurpose Redunant in preset_info] pid: 32753, tid: 327, name: Thread-2146 >>> com.intelligency <<<
01-08 11:18:29.335 2529-2529/? 我/调试:*** *** *** *** *** *** *** *** *** *** *** *** *** *** * **
01-08 11:18:29.336 2529-2529/? I/DEBUG: pid: 32753, tid: 327, name: Thread-2146 >>> com.intelligency <<<
01-08 11:18:29.336 2529-2529/? I/DEBUG:信号 11 (SIGSEGV),代码 1 (SEGV_MAPERR),故障地址 00000000
01-08 11:18:29.489 2529-2529/? I/DEBUG:r0 001fa400 r1 00000000 r2 4270bc10 r3 00000438
01-08 11:18:29.489 2529-2529/? I/DEBUG:r4 5cbc59f0 r5 00000000 r6 00000000 r7 5e14fb00
01-08 11:18:29.489 2529-2529/? I/DEBUG:r8 41e259b8 r9 5d78ff80 sl 5cc16498 fp 5d88fc4c
01-08 11:18:29.489 2529-2529/? I/DEBUG:ip 5cbcae00 sp 5d88fb98 lr 5e1745cb pc 5e0aef42 cpsr 20000030
01-08 11:18:29.491 2529-2529/? I/DEBUG:回溯:
01-08 11:18:29.491 2529-2529/? I/DEBUG:#00 pc 00016f42 /data/app-lib/com.intelligency-1/libcom_graphics_NativeGraphics.so (GraphicsCoreNS::GraphicsCore::yuvToRGB(_JNIEnv*, _jclass*, _jbyteArray*, _jobject*)+201)
01-08 11:18:29.491 2529-2529/? I/DEBUG:#01 pc 00016e43 /data/app-lib/com.intelligency-1/libcom_graphics_NativeGraphics.so (Java_com_graphics_NativeGraphics_nativeYuvToRGB+32)
01-08 11:18:29.491 2529-2529/? I/DEBUG:#02 pc 0001e910 /system/lib/libdvm.so (dvmPlatformInvoke+112)
01-08 11:18:29.491 2529-2529/? I/DEBUG:#03 pc 0004e7c9 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+500)
01-08 11:18:29.491 2529-2529/? I/DEBUG:#04 pc 00050cc9 /system/lib/libdvm.so (dvmResolveNativeMethod(unsigned int const*, JValue*, Method const*, Thread*)+200)
01-08 11:18:29.491 2529-2529/? I/DEBUG:#05 pc 00027d2c /system/lib/libdvm.so
01-08 11:18:29.491 2529-2529/? I/DEBUG:#06 pc 000fedc8 [stack:327]
01-08 11:18:29.491 2529-2529/? I/DEBUG﹕堆栈:
01-08 11:18:29.491 2529-2529/? I/DEBUG:5d88fb58 41e11700 /dev/ashmem/dalvik-heap(已删除)
01-08 11:18:29.491 2529-2529/? I/DEBUG:5d88fb5c 409d11bd /system/lib/libdvm.so
01-08 11:18:29.491 2529-2529/? I/DEBUG:5d88fb60 41e11700 /dev/ashmem/dalvik-heap(已删除)
01-08 11:18:29.491 2529-2529/? I/DEBUG:5d88fb64 409d38c1 /system/lib/libdvm.so
01-08 11:18:29.491 2529-2529/? 我/调试:5d88fb68 5cbc59f0
01-08 11:18:29.491 2529-2529/? 我/调试:5d88fb6c 5cc16488
01-08 11:18:29.491 2529-2529/? 我/调试:5d88fb70 00000001
01-08 11:18:29.491 2529-2529/? 我/调试:5d88fb74 5b959510
01-08 11:18:29.491 2529-2529/? 我/调试:5d88fb78 00000001
01-08 11:18:29.491 2529-2529/? I/DEBUG:5d88fb7c 5d88fba8 [stack:327]
01-08 11:18:29.491 2529-2529/? 我/调试:5d88fb80 00000000
01-08 11:18:29.491 2529-2529/? I/DEBUG:5d88fb84 5e1745cb /system/lib/libjnigraphics.so (AndroidBitmap_lockPixels+34)
01-08 11:18:29.491 2529-2529/? 我/调试:5d88fb88 5cbc59f0
01-08 11:18:29.491 2529-2529/? I/DEBUG:5d88fb8c 41e259c8 /dev/ashmem/dalvik-heap (deleted)
01-08 11:18:29.491 2529-2529/? I/DEBUG:5d88fb90 df0027ad
01-08 11:18:29.491 2529-2529/? 我/调试:5d88fb94 00000000
01-08 11:18:29.492 2529-2529/? 我/调试:#00 5d88fb98 00000438
01-08 11:18:29.492 2529-2529/? I/DEBUG:5d88fb9c 00001e00
01-08 11:18:29.492 2529-2529/? 我/调试:5d88fba0 00000001
01-08 11:18:29.492 2529-2529/? 我/调试:5d88fba4 00000000
01-08 11:18:29.492 2529-2529/? I/DEBUG: 5d88fba8 4270bc10 /dev/ashmem/dalvik-heap (deleted)
01-08 11:18:29.492 2529-2529/? 我/调试:5d88fbac 00000780
01-08 11:18:29.492 2529-2529/? 我/调试:5d88fbb0 00000438
01-08 11:18:29.492 2529-2529/? I/DEBUG:5d88fbb4 00001e00
01-08 11:18:29.492 2529-2529/? 我/调试:5d88fbb8 00000001
01-08 11:18:29.492 2529-2529/? 我/调试:5d88fbbc 00000000
01-08 11:18:29.492 2529-2529/? 我/调试:5d88fbc0 00000000
01-08 11:18:29.492 2529-2529/? 我/调试:5d88fbc4 00000000
01-08 11:18:29.492 2529-2529/? 我/调试:5d88fbc8 00000000
01-08 11:18:29.492 2529-2529/? 我/调试:5d88fbcc 00000000
01-08 11:18:29.492 2529-2529/? 我/调试:5d88fbd0 00000000
01-08 11:18:29.492 2529-2529/? 我/调试:5d88fbd4 00000000
01-08 11:18:29.492 2529-2529/? 我/调试:........ ........
01-08 11:18:29.492 2529-2529/? I/DEBUG:#01 5d88fc10 41e11700 /dev/ashmem/dalvik-heap (deleted)
01-08 11:18:29.492 2529-2529/? I/DEBUG:5d88fc14 41c677f8 /dev/ashmem/dalvik-heap (deleted)
01-08 11:18:29.492 2529-2529/? I/DEBUG:5d88fc18 41e259b8 /dev/ashmem/dalvik-heap(已删除)
01-08 11:18:29.492 2529-2529/? I/DEBUG:5d88fc1c 41e11700 /dev/ashmem/dalvik-heap (deleted)
01-08 11:18:29.492 2529-2529/? I/DEBUG:5d88fc20 57186198 /dev/ashmem/dalvik-LinearAlloc(已删除)
01-08 11:18:29.492 2529-2529/? 我/调试:5d88fc24 5cc16488
01-08 11:18:29.492 2529-2529/? 我/调试:5d88fc28 00000000
01-08 11:18:29.492 2529-2529/? 我/调试:5d88fc2c 5d78ff88
01-08 11:18:29.492 2529-2529/? I/DEBUG:5d88fc30 5d88fc38 [stack:327]
01-08 11:18:29.492 2529-2529/? I/DEBUG:5d88fc34 409a5914 /system/lib/libdvm.so (dvmPlatformInvoke+116)
01-08 11:18:29.492 2529-2529/? 我/调试:#02 5d88fc38 5d78ff80
01-08 11:18:29.492 2529-2529/? 我/调试:5d88fc3c 00000000
01-08 11:18:29.493 2529-2529/? I/DEBUG: 5d88fc40 41c677f8 /dev/ashmem/dalvik-heap (deleted)
01-08 11:18:29.493 2529-2529/? 我/调试:5d88fc44 00000001
01-08 11:18:29.493 2529-2529/? 我/调试:5d88fc48 00000000
01-08 11:18:29.493 2529-2529/? I/DEBUG:5d88fc4c 409d57cd /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+504)
01-08 11:18:29.494 2529-2529/? I/DEBUG:r0附近的内存:
01-08 11:18:29.494 2529-2529/? I/DEBUG:001fa3e0 ffffffff ffffffff ffffffff ffffffff ......
01-08 11:18:29.494 2529-2529/? I/DEBUG:001fa3f0 ffffffff ffffffff ffffffff ffffffff ......
01-08 11:18:29.494 2529-2529/? I/DEBUG:001fa400 ffffffff ffffffff ffffffff ffffffff ......
01-08 11:18:29.494 2529-2529/? I/DEBUG:001fa410 ffffffff ffffffff ffffffff ffffffff ......
01-08 11:18:29.494 2529-2529/? I/DEBUG:001fa420 ffffffff ffffffff ffffffff ffffffff ......
01-08 11:18:29.494 2529-2529/? I/DEBUG:r2附近的内存:
01-08 11:18:29.494 2529-2529/? I/DEBUG:4270bbf0 82828282 82828282 00000000 007e901b ........
01-08 11:18:29.494 2529-2529/? I/DEBUG:4270bc00 40ecc800 00000000 007e9000 00000000 ...@......~.....
01-08 11:18:29.494 2529-2529/? I/DEBUG:4270bc10 00000000 00000000 00000000 00000000 ......
01-08 11:18:29.495 2529-2529/? I/DEBUG:4270bc20 00000000 00000000 00000000 00000000 ......
01-08 11:18:29.495 2529-2529/? I/DEBUG:4270bc30 00000000 00000000 00000000 00000000 ......
01-08 11:18:29.495 2529-2529/? I/DEBUG:r4附近的内存:
01-08 11:18:29.495 2529-2529/? I/DEBUG:5cbc59d0 0001af28 00000000 40eb2bd0 696d7201 (........+.@.rmi
01-08 11:18:29.495 2529-2529/? I/DEBUG: 5cbc59e0 81600029 6c6f6800 00000000 0000002b).`..hol....+...
01-08 11:18:29.495 2529-2529/? I/DEBUG:5cbc59f0 40a3d4c0 00000000 0000000c 5cc16488 ...@........d.\
01-08 11:18:29.495 2529-2529/? I/DEBUG: 5cbc5a00 00000000 00000000 5cbb3528 00726564 ........(5.\der.
01-08 11:18:29.495 2529-2529/? I/DEBUG:5cbc5a10 00000028 0000002b 006e0041 00610074 (...+...安踏
01-08 11:18:29.495 2529-2529/? I/DEBUG:r7附近的内存:
01-08 11:18:29.495 2529-2529/? I/DEBUG:5e14fae0 7fffa890 8016afb0 7fffae30 8014afb0 ........0.......
01-08 11:18:29.495 2529-2529/? I/DEBUG:5e14faf0 7fffb0e0 7fffc870 7fffb668 00000001 ....p....h.......
01-08 11:18:29.495 2529-2529/? I/DEBUG:5e14fb00 ffffffff ffffffff 00000000 00000000 ......
01-08 11:18:29.495 2529-2529/? I/DEBUG:5e14fb10 00000000 00000000 00000000 00000000 ......
01-08 11:18:29.495 2529-2529/? I/DEBUG:5e14fb20 00000000 00000000 00000000 00000000 ......
01-08 11:18:29.495 2529-2529/? I/DEBUG﹕r8 附近的内存:
01-08 11:18:29.495 2529-2529/? I/DEBUG:41e25998 00000004 00000000 00000000 00000000 ......
01-08 11:18:29.495 2529-2529/? I/DEBUG:41e259a8 00000000 00000000 00000000 002f761b ....v/.
01-08 11:18:29.495 2529-2529/? I/DEBUG:41e259b8 40ecc800 00000000 002f7600 00000000 ...@.....v/.....
01-08 11:18:29.495 2529-2529/? 我/调试:41e259c8 02020202 03030202 03030303 03030303 ......
01-08 11:18:29.495 2529-2529/? 我/调试:41e259d8 03030303 02030303 02020202 02020202 ......
01-08 11:18:29.495 2529-2529/? I/DEBUG:r9附近的内存:
01-08 11:18:29.496 2529-2529/? I/DEBUG:5d78ff60 00000001 5d78ff9c 5d533604 5d78ff9c ......x].6S]..x]
01-08 11:18:29.496 2529-2529/? I/DEBUG:5d78ff70 5d53360c 57186198 00000000 00000000 .6S].aW.......
01-08 11:18:29.496 2529-2529/? I/DEBUG:5d78ff80 41e259b8 41e11700 5d78ffc4 5d533bc8 .YA..A..x].;S]
01-08 11:18:29.496 2529-2529/? I/DEBUG:5d78ff90 57186240 5d53360c 00000000 41e11700 @bW6S].......A
01-08 11:18:29.496 2529-2529/? I/DEBUG:5d78ffa0 40ef5450 41e259b8 00000780 00000438 PT.@.YA...8...
01-08 11:18:29.496 2529-2529/? I/DEBUG:sl 附近的内存:
01-08 11:18:29.496 2529-2529/? I/DEBUG: 5cc16478 00000002 00000000 5cba7748 00000453 ....Hw.\S...
01-08 11:18:29.496 2529-2529/? 我/调试:5cc16488 5d53360c 5d78ff80 57186240 5d54d000 .6S]..x]@bW.T]
01-08 11:18:29.496 2529-2529/? I/DEBUG:5cc16498 41e11700 00000000 5d88fd98 00000000 ...A.......]....
01-08 11:18:29.496 2529-2529/? I/DEBUG:5cc164a8 5d88fdcc 0000000c 00010008 409aa900 ...]............@
01-08 11:18:29.496 2529-2529/? I/DEBUG:5cc164b8 00000000 00000000 56403770 5d770300 ........p7@V..w]
01-08 11:18:29.496 2529-2529/? I/DEBUG:fp附近的内存:
01-08 11:18:29.496 2529-2529/? I/DEBUG:5d88fc2c 5d78ff88 5d88fc38 409a5914 5d78ff80 ..x]8..].Y.@..x]
01-08 11:18:29.496 2529-2529/? I/DEBUG:5d88fc3c 00000000 41c677f8 00000001 00000000 .....wA.......
01-08 11:18:29.496 2529-2529/? I/DEBUG:5d88fc4c 409d57cd 5d78ff80 5d542135 5e0aee23 .W.@..x]5!T]#..^
01-08 11:18:29.496 2529-2529/? I/DEBUG:5d88fc5c 5cc16498 0000010a 41c677f8 409d7e9b .d.\.....wA~.@
01-08 11:18:29.496 2529-2529/? I/DEBUG:5d88fc6c 40164210 5b9584d0 5cba9420 00000000 .B.@...[ ..\....
01-08 11:18:29.496 2529-2529/? I/DEBUG:ip附近的内存:
01-08 11:18:29.496 2529-2529/? I/DEBUG: 5cbcade0 6f207372 20796c6e 63206669 61726168 rs 仅当 chara
01-08 11:18:29.496 2529-2529/? I/DEBUG:5cbcadf0 72657463 756f6320 6d20746e 0000004b cter count mK...
01-08 11:18:29.496 2529-2529/? I/DEBUG: 5cbcae00 402cc0b0 00000001 4047242c 4270bc10 ..,@....,$G@..pB
01-08 11:18:29.497 2529-2529/? I/DEBUG:5cbcae10 00000000 075bcd15 00000000 40447f10 ......[.......D@
01-08 11:18:29.497 2529-2529/? I/DEBUG:5cbcae20 62690100 4270bc10 007e9000 00000000 ..ib..pB ........
01-08 11:18:29.497 2529-2529/? I/DEBUG:sp附近的内存:
01-08 11:18:29.497 2529-2529/? I/DEBUG:5d88fb78 00000001 5d88fba8 00000000 5e1745cb ....].....E.^
01-08 11:18:29.497 2529-2529/? I/DEBUG:5d88fb88 5cbc59f0 41e259c8 df0027ad 00000000 .Y.\.YA'......
01-08 11:18:29.497 2529-2529/? I/DEBUG:5d88fb98 00000438 00001e00 00000001 00000000 8......
01-08 11:18:29.497 2529-2529/? I/DEBUG:5d88fba8 4270bc10 00000780 00000438 00001e00 ..pB....8.......
01-08 11:18:29.497 2529-2529/? 我/调试:5d88fbb8 00000001 00000000 00000000 00000000 ......
01-08 11:18:29.497 2529-2529/? I/DEBUG:电脑周围的代码:
01-08 11:18:29.497 2529-2529/? I/DEBUG:5e0aef20 4f2a9b06 43589a04 f04f447f f04f0500 ..*O..XC.DO...O。
01-08 11:18:29.497 2529-2529/? I/DEBUG:5e0aef30 f9270600 ee80370f ee815b10 ee825b10 ..'..7...[...[..
01-08 11:18:29.497 2529-2529/? I/DEBUG:5e0aef40 f9255b10 f925070f f925170f f982270d .[%...%...%..'..
01-08 11:18:29.497 2529-2529/? I/DEBUG:5e0aef50 f982030d f982032d f982034d f982036d ....-...M...m...
01-08 11:18:29.497 2529-2529/? I/DEBUG:5e0aef60 f982038d f98203ad f98203cd 380803ed ................8
01-08 11:18:29.497 2529-2529/? I/DEBUG: lr 周围的代码:
01-08 11:18:29.497 2529-2529/? I/DEBUG:5e1745a8 f1d0b570 bf380501 46142500 bf082900 p.....8..%.F.)..
01-08 11:18:29.497 2529-2529/? I/DEBUG:5e1745b8 0501f045 f7ffb98d 4606ef70 f7ffb180 E....p..F....
01-08 11:18:29.497 2529-2529/? I/DEBUG:5e1745c8 6933ef72 4630b92b ef72f7ff 0002f06f r.3i+.0F..ro..
01-08 11:18:29.497 2529-2529/? I/DEBUG:5e1745d8 b144bd70 46286023 f04fbd70 bd7030ff pD#`(Fp.O..0p.
01-08 11:18:29.498 2529-2529/? I/DEBUG:5e1745e8 0001f06f 4620bd70 b538bd70 0401f1d0 o...p。Fp.8……
于 2015-01-08T16:59:50.557 回答
0

我遇到了同样的问题 - 尝试更改 NDK 的工具链。我相信它默认设置为 arm-linux-androideabi-4.6,但如果您将其更改为 arm-linux-androideabi-4.8 它应该可以工作。

于 2013-11-05T22:48:32.950 回答