ANPR项目 - 开始时立即关闭

时间:2013-07-01 09:37:27

标签: android graphics rgb anpr

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

当我尝试执行该应用时,该应用正在关闭

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

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

3 个答案:

答案 0 :(得分:0)

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

答案 1 :(得分:0)

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

答案 2 :(得分: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﹕ Neon support - ok/ armv7: 2.6.29-g582a0f5 #38 / default: 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﹕ gray image :: width is 1920; height is 1080; stride is 7680; format is 1;flags is0
01-08 11:18:29.223    32753-327/? A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 327 (Thread-2146)
01-08 11:18:29.227    32753-327/? A/libc﹕ Send stop signal to pid:32753 in debugger_signal_handler
01-08 11:18:29.230    2529-2529/? I/DEBUG﹕ handle_request(15)
01-08 11:18:29.230    2529-2529/? I/DEBUG﹕ check process 32753 name: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/? I/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
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﹕ signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 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﹕ backtrace:
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﹕ stack:
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb58  41e11700  /dev/ashmem/dalvik-heap (deleted)
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 (deleted)
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb64  409d38c1  /system/lib/libdvm.so
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb68  5cbc59f0
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb6c  5cc16488
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb70  00000001
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb74  5b959510
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb78  00000001
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 5d88fb7c  5d88fba8  [stack:327]
01-08 11:18:29.491    2529-2529/? I/DEBUG﹕ 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/? I/DEBUG﹕ 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/? I/DEBUG﹕ 5d88fb94  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ #00  5d88fb98  00000438
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fb9c  00001e00
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fba0  00000001
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 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/? I/DEBUG﹕ 5d88fbac  00000780
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbb0  00000438
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbb4  00001e00
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbb8  00000001
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbbc  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbc0  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbc4  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbc8  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbcc  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbd0  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fbd4  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ ........  ........
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 (deleted)
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 (deleted)
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fc24  5cc16488
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 5d88fc28  00000000
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 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/? I/DEBUG﹕ #02  5d88fc38  5d78ff80
01-08 11:18:29.492    2529-2529/? I/DEBUG﹕ 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/? I/DEBUG﹕ 5d88fc44  00000001
01-08 11:18:29.493    2529-2529/? I/DEBUG﹕ 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﹕ memory near 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﹕ memory near 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﹕ memory near 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  (...+...A.n.t.a.
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ memory near 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﹕ memory near 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/? I/DEBUG﹕ 41e259c8 02020202 03030202 03030303 03030303  ................
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ 41e259d8 03030303 02030303 02020202 02020202  ................
01-08 11:18:29.495    2529-2529/? I/DEBUG﹕ memory near 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].a.W........
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5d78ff80 41e259b8 41e11700 5d78ffc4 5d533bc8  .Y.A...A..x].;S]
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5d78ff90 57186240 5d53360c 00000000 41e11700  @b.W.6S].......A
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5d78ffa0 40ef5450 41e259b8 00000780 00000438  PT.@.Y.A....8...
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ memory near 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/? I/DEBUG﹕ 5cc16488 5d53360c 5d78ff80 57186240 5d54d000  .6S]..x]@b.W..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﹕ memory near 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  .....w.A........
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.\.....w.A.~.@
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﹕ memory near ip:
01-08 11:18:29.496    2529-2529/? I/DEBUG﹕ 5cbcade0 6f207372 20796c6e 63206669 61726168  rs only if 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﹕ memory near 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.\.Y.A.'......
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/? I/DEBUG﹕ 5d88fbb8 00000001 00000000 00000000 00000000  ................
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ code around pc:
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﹕ code around 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..r.o...
01-08 11:18:29.497    2529-2529/? I/DEBUG﹕ 5e1745d8 b144bd70 46286023 f04fbd70 bd7030ff  p.D.#`(Fp.O..0p.
01-08 11:18:29.498    2529-2529/? I/DEBUG﹕ 5e1745e8 0001f06f 4620bd70 b538bd70 0401f1d0  o...p. Fp.8.....