zoukankan      html  css  js  c++  java
  • 车牌识别--OMAP4430处理器上測试

    OMAP4430(ME865)
    arm-linux-gcc 4.5.1(FriendlyARM)
    软浮点执行结果:
    root@lj:/workspace/carid# arm-linux-gcc car.c -o softcar -lm -static
    640x480BMP位图须要大概380ms
    320x140BMP位图须要大概140ms


    O3优化后性能提升一倍多
    root@lj:/workspace/carid# arm-linux-gcc car.c -o softcar -lm -static -O3
    640x480BMP位图须要大概175ms

    320x140BMP位图须要大概60ms


    没有优化測试:

    root@edison:/data # ./softcar /sdcard/test/1.bmp
    ./softcar /sdcard/test/1.bmp
    
    BMP Size IS:921654
    W:640  H:480
    
    
    The Car ID IS:
    粤 A F Q 7 8 7
    
    
    time 375ms
    root@edison:/data # ./softcar /sdcard/test/2.bmp
    ./softcar /sdcard/test/2.bmp
    
    BMP Size IS:921654
    W:640  H:480
    
    
    The Car ID IS:
    粤 A 8 S 3 0 8
    
    
    time 382ms
    root@edison:/data # ./softcar /sdcard/test/3.bmp
    ./softcar /sdcard/test/3.bmp
    
    BMP Size IS:230454
    W:320  H:240
    
    
    The Car ID IS:
    粤 A G F 7 5 1
    
    
    time 140ms
    root@edison:/data # ./softcar /sdcard/test/4.bmp
    ./softcar /sdcard/test/4.bmp
    
    BMP Size IS:230454
    W:320  H:240
    
    
    The Car ID IS:
    粤 A 8 S 3 0 8
    
    
    time 145ms
    root@edison:/data # ./softcar /sdcard/test/5.bmp
    ./softcar /sdcard/test/5.bmp
    
    BMP Size IS:921654
    W:640  H:480
    
    
    The Car ID IS:
    粤 M 0 7 3 6 9
    
    
    time 342ms
    root@edison:/data # ./softcar /sdcard/test/6.bmp
    ./softcar /sdcard/test/6.bmp
    
    BMP Size IS:921654
    W:640  H:480
    
    
    The Car ID IS:
    粤 A 6 Y 2 6 8
    
    
    time 372ms
    root@edison:/data # ./softcar /sdcard/test/7.bmp
    ./softcar /sdcard/test/7.bmp
    
    BMP Size IS:230454
    W:320  H:240
    
    
    The Car ID IS:
    粤 A 9 X 6 6 7
    
    
    time 137ms
    root@edison:/data # ./softcar /sdcard/test/8.bmp
    ./softcar /sdcard/test/8.bmp
    
    BMP Size IS:921654
    W:640  H:480
    
    
    The Car ID IS:
    粤 A P 6 8 3 8
    
    
    time 422ms
    root@edison:/data # ./softcar /sdcard/test/9.bmp
    ./softcar /sdcard/test/9.bmp
    
    BMP Size IS:879414
    W:640  H:458
    
    
    The Car ID IS:
    粤 A F N 5 5 3
    
    
    time 378ms
    root@edison:/data # ./softcar /sdcard/test/10.bmp
    ./softcar /sdcard/test/10.bmp
    
    BMP Size IS:1004214
    W:640  H:523
    
    
    The Car ID IS:
    皖 J 0 8 0 3 6
    
    
    time 397ms
    root@edison:/data # ./softcar /sdcard/test/11.bmp
    ./softcar /sdcard/test/11.bmp
    
    BMP Size IS:1035978
    W:665  H:519
    
    
    The Car ID IS:
    苏 B H 6 0 8 2
    
    
    time 393ms
    root@edison:/data # ./softcar /sdcard/test/12.bmp
    ./softcar /sdcard/test/12.bmp
    
    BMP Size IS:921654
    W:640  H:480
    
    
    The Car ID IS:
    粤 A F Z 9 0 5
    
    
    time 380ms
    root@edison:/data # ./softcar /sdcard/test/13.bmp
    ./softcar /sdcard/test/13.bmp
    
    BMP Size IS:921654
    W:640  H:480
    
    
    The Car ID IS:
    粤 A A D 2 6 3
    
    
    time 391ms
    root@edison:/data #

    O3优化后測试结果:

    root@edison:/data # ./softcar /sdcard/test/1.bmp
    ./softcar /sdcard/test/1.bmp
    
    BMP Size is:921654
    W:640  H:480
    
    
    The Car ID IS:
    粤 A F Q 7 8 7
    
    
    time 165ms
    root@edison:/data # ./softcar /sdcard/test/2.bmp
    ./softcar /sdcard/test/2.bmp
    
    BMP Size is:921654
    W:640  H:480
    
    
    The Car ID IS:
    粤 A 8 S 3 0 8
    
    
    time 173ms
    root@edison:/data # ./softcar /sdcard/test/3.bmp
    ./softcar /sdcard/test/3.bmp
    
    BMP Size is:230454
    W:320  H:240
    
    
    The Car ID IS:
    粤 A G F 7 5 1
    
    
    time 62ms
    root@edison:/data # ./softcar /sdcard/test/4.bmp
    ./softcar /sdcard/test/4.bmp
    
    BMP Size is:230454
    W:320  H:240
    
    
    The Car ID IS:
    粤 A 8 S 3 0 8
    
    
    time 61ms
    root@edison:/data # ./softcar /sdcard/test/5.bmp
    ./softcar /sdcard/test/5.bmp
    
    BMP Size is:921654
    W:640  H:480
    
    
    The Car ID IS:
    粤 M 0 7 3 6 9
    
    
    time 152ms
    root@edison:/data # ./softcar /sdcard/test/6.bmp
    ./softcar /sdcard/test/6.bmp
    
    BMP Size is:921654
    W:640  H:480
    
    
    The Car ID IS:
    粤 A 6 Y 2 6 8
    
    
    time 169ms
    root@edison:/data # ./softcar /sdcard/test/7.bmp
    ./softcar /sdcard/test/7.bmp
    
    BMP Size is:230454
    W:320  H:240
    
    
    The Car ID IS:
    粤 A 9 X 6 6 7
    
    
    time 59ms
    root@edison:/data # ./softcar /sdcard/test/8.bmp
    ./softcar /sdcard/test/8.bmp
    
    BMP Size is:921654
    W:640  H:480
    
    
    The Car ID IS:
    粤 A P 6 8 3 8
    
    
    time 179ms
    root@edison:/data # ./softcar /sdcard/test/9.bmp
    ./softcar /sdcard/test/9.bmp
    
    BMP Size is:879414
    W:640  H:458
    
    
    The Car ID IS:
    粤 A F N 5 5 3
    
    
    time 179ms
    root@edison:/data # ./softcar /sdcard/test/10.bmp
    ./softcar /sdcard/test/10.bmp
    
    BMP Size is:1004214
    W:640  H:523
    
    
    The Car ID IS:
    皖 J 0 8 0 3 6
    
    
    time 180ms
    root@edison:/data # ./softcar /sdcard/test/11.bmp
    ./softcar /sdcard/test/11.bmp
    
    BMP Size is:1035978
    W:665  H:519
    
    
    The Car ID IS:
    苏 B H 6 0 8 2
    
    
    time 172ms
    root@edison:/data # ./softcar /sdcard/test/12.bmp
    ./softcar /sdcard/test/12.bmp
    
    BMP Size is:921654
    W:640  H:480
    
    
    The Car ID IS:
    粤 A F Z 9 0 5
    
    
    time 175ms
    root@edison:/data # ./softcar /sdcard/test/13.bmp
    ./softcar /sdcard/test/13.bmp
    
    BMP Size is:921654
    W:640  H:480
    
    
    The Car ID IS:
    粤 A A D 2 6 3
    
    
    time 174ms
    代码本身有非常多优化的地方,尤其是浮点和for循环。

    假设做好优化,预计再S5PV210上可以在100ms以内处理单张车牌。


    代码稍后提供

  • 相关阅读:
    Json,Gson,FastJson解析笔记
    Java 里把 InputStream 转换成 String 的几种方法
    11大Java开源中文分词器的使用方法和分词效果对比,当前几个主要的Lucene中文分词器的比较
    HDU 1599 find the mincost route
    如何更改Java括号中的默认对齐
    Android Java 与 C++ 恒调用,路径、文件名、延长的最大长度
    使用android SpannableStringBuilder实现图文混排,看到许多其他
    POJ 2352 Stars 树阵
    cocos2dx环境配置和打包
    DSR on Openstack POC
  • 原文地址:https://www.cnblogs.com/slgkaifa/p/6853882.html
Copyright © 2011-2022 走看看