车牌识别--S5PV210测试第二次优化

优化:

1、RGB转HSV 浮点运算改成定点运算;

2、匹配模板由图片改成C语言数组;

3、优化测试BMP车牌图片读取(两层for循环改为一层for循环);

整体相比优化之前时间减少110ms左右。

640x480: 160ms 左右

320x240: 55ms 左右

[[email protected]]#./car test/1.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
ÔÁ A F Q 7 8 7

Total Time: time use:158ms
[[email protected]]#./car test/2.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
ÔÁ A 8 S 3 0 8

Total Time: time use:162ms
[[email protected]]#./car test/3.bmp
BMP Size:230454, Info_length:54, H:320, W:240

The Car ID IS:
ÔÁ A G F 7 5 1

Total Time: time use:57ms
[[email protected]]#./car test/4.bmp
BMP Size:230454, Info_length:54, H:320, W:240

The Car ID IS:
ÔÁ A 8 S 3 0 8

Total Time: time use:55ms
[[email protected]]#./car test/5.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
ÔÁ M 0 7 3 6 9

Total Time: time use:141ms
[[email protected]]#./car test/6.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
ÔÁ A 6 Y 2 6 8

Total Time: time use:163ms
[[email protected]]#./car test/7.bmp
BMP Size:230454, Info_length:54, H:320, W:240

The Car ID IS:
ÔÁ A 9 X 6 6 7

Total Time: time use:59ms
[[email protected]]#./car test/8.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
ÔÁ A P 6 8 3 8

Total Time: time use:186ms
[[email protected]]#./car test/9.bmp
BMP Size:879414, Info_length:54, H:640, W:458

The Car ID IS:
ÔÁ A F N 5 5 3

Total Time: time use:167ms
[[email protected]]#./car test/10.bmp
BMP Size:1004214, Info_length:54, H:640, W:523

The Car ID IS:
Íî J 0 8 0 3 6

Total Time: time use:169ms
[[email protected]]#./car test/11.bmp
BMP Size:1035978, Info_length:54, H:665, W:519

The Car ID IS:
ËÕ B H 6 0 8 2

Total Time: time use:172ms
[[email protected]]#./car test/12.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
ÔÁ A F Z 9 0 5

Total Time: time use:172ms
[[email protected]]#./car test/13.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
ÔÁ A A D 2 6 3

Total Time: time use:172ms

目前影响时间的问题,已经不是浮点了,而是大量的for循环中的运算,60%的时间都使用在车牌定位中, 一旦车牌定位后,后面的字符分割和匹配使用10ms左右时间,就可以完成。

对比测试使用的笔记本I3-380cpu,虚拟机运行结果

640X480:27ms左右

320x240:    9ms左右

[email protected]:/work/carid/0532# ./car test/1.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
?? A F Q 7 8 7

Total Time: time use:27ms
[email protected]:/work/carid/0532# ./car test/2.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
?? A 8 S 3 0 8

Total Time: time use:103ms
[email protected]:/work/carid/0532# ./car test/3.bmp
BMP Size:230454, Info_length:54, H:320, W:240

The Car ID IS:
?? A G F 7 5 1

Total Time: time use:9ms
[email protected]:/work/carid/0532# ./car test/4.bmp
BMP Size:230454, Info_length:54, H:320, W:240

The Car ID IS:
?? A 8 S 3 0 8

Total Time: time use:9ms
[email protected]:/work/carid/0532# ./car test/5.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
?? M 0 7 3 6 9

Total Time: time use:23ms
[email protected]:/work/carid/0532# ./car test/6.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
?? A 6 Y 2 6 8

Total Time: time use:33ms
[email protected]:/work/carid/0532# ./car test/7.bmp
BMP Size:230454, Info_length:54, H:320, W:240

The Car ID IS:
?? A 9 X 6 6 7

Total Time: time use:9ms
[email protected]:/work/carid/0532# ./car test/8.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
?? A P 6 8 3 8

Total Time: time use:28ms
[email protected]:/work/carid/0532# ./car test/9.bmp
BMP Size:879414, Info_length:54, H:640, W:458

The Car ID IS:
?? A F N 5 5 3

Total Time: time use:25ms
[email protected]:/work/carid/0532# ./car test/10.bmp
BMP Size:1004214, Info_length:54, H:640, W:523

The Car ID IS:
?? J 0 8 0 3 6

Total Time: time use:27ms
[email protected]:/work/carid/0532# ./car test/11.bmp
BMP Size:1035978, Info_length:54, H:665, W:519

The Car ID IS:
?? B H 6 0 8 2

Total Time: time use:27ms
[email protected]:/work/carid/0532# ./car test/12.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
?? A F Z 9 0 5

Total Time: time use:27ms
[email protected]:/work/carid/0532# ./car test/13.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
?? A A D 2 6 3

Total Time: time use:25ms

对比ME865(OMAP4430)

640x480:130ms左右

320x240:50ms左右

[email protected]:/data # ./car /sdcard/test/1.bmp
./car /sdcard/test/1.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
粤 A F Q 7 8 7

Total Time: time use:122ms
[email protected]:/data # ./car /sdcard/test/2.bmp
./car /sdcard/test/2.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
粤 A 8 S 3 0 8

Total Time: time use:125ms
[email protected]:/data # ./car /sdcard/test/3.bmp
./car /sdcard/test/3.bmp
BMP Size:230454, Info_length:54, H:320, W:240

The Car ID IS:
粤 A G F 7 5 1

Total Time: time use:50ms
[email protected]:/data # ./car /sdcard/test/4.bmp
./car /sdcard/test/4.bmp
BMP Size:230454, Info_length:54, H:320, W:240

The Car ID IS:
粤 A 8 S 3 0 8

Total Time: time use:42ms
[email protected]:/data # ./car /sdcard/test/5.bmp
./car /sdcard/test/5.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
粤 M 0 7 3 6 9

Total Time: time use:94ms
[email protected]:/data # ./car /sdcard/test/6.bmp
./car /sdcard/test/6.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
粤 A 6 Y 2 6 8

Total Time: time use:134ms
[email protected]:/data # ./car /sdcard/test/7.bmp
./car /sdcard/test/7.bmp
BMP Size:230454, Info_length:54, H:320, W:240

The Car ID IS:
粤 A 9 X 6 6 7

Total Time: time use:51ms
[email protected]:/data # ./car /sdcard/test/8.bmp
./car /sdcard/test/8.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
粤 A P 6 8 3 8

Total Time: time use:132ms
[email protected]:/data # ./car /sdcard/test/9.bmp
./car /sdcard/test/9.bmp
BMP Size:879414, Info_length:54, H:640, W:458

The Car ID IS:
粤 A F N 5 5 3

Total Time: time use:124ms
[email protected]:/data # ./car /sdcard/test/10.bmp
./car /sdcard/test/10.bmp
BMP Size:1004214, Info_length:54, H:640, W:523

The Car ID IS:
皖 J 0 8 0 3 6

Total Time: time use:171ms
[email protected]:/data # ./car /sdcard/test/11.bmp
./car /sdcard/test/11.bmp
BMP Size:1035978, Info_length:54, H:665, W:519

The Car ID IS:
苏 B H 6 0 8 2

Total Time: time use:207ms
[email protected]:/data # ./car /sdcard/test/12.bmp
./car /sdcard/test/12.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
粤 A F Z 9 0 5

Total Time: time use:204ms
[email protected]:/data # ./car /sdcard/test/13.bmp
./car /sdcard/test/13.bmp
BMP Size:921654, Info_length:54, H:640, W:480

The Car ID IS:
粤 A A D 2 6 3

Total Time: time use:138ms

车牌识别--S5PV210测试第二次优化

时间: 2024-10-21 17:59:19

车牌识别--S5PV210测试第二次优化的相关文章

车牌识别--S5PV210测试

cortex-A8(S5PV210) Linux-3.9.7 arm-linux-gcc 4.5.1(FriendlyARM) 根文件系统:NFS 软浮点运行结果: [[email protected]]#./softcar /udisk/mmcblk0p1/test/1.bmp BMP Size is:921654 W:640 H:480 The Car ID IS: ÔÁ A F Q 7 8 7 time 272ms [[email protected]]#./softcar /udisk/

车牌识别--OMAP4430处理器上测试

OMAP4430(ME865) arm-linux-gcc 4.5.1(FriendlyARM) 软浮点运行结果: [email protected]:/workspace/carid# arm-linux-gcc car.c -o softcar -lm -static 640x480BMP位图需要大概380ms 320x140BMP位图需要大概140ms O3优化后性能提升一倍多 [email protected]:/workspace/carid# arm-linux-gcc car.c

javacpp-opencv图像处理系列:国内车辆牌照检测识别系统(万份测试车牌识别准确率99.7%以上,单次平均耗时39ms)

javaCV图像处理系列: 一.javaCV图像处理之1:实时视频添加文字水印并截取视频图像保存成图片,实现文字水印的字体.位置.大小.粗度.翻转.平滑等操作 二.javaCV图像处理之2:实时视频添加图片水印,实现不同大小图片叠加,图像透明度控制 三.opencv图像处理3:使用opencv原生方法遍历摄像头设备及调用(方便多摄像头遍历及调用,相比javacv更快的摄像头读取速度和效率,方便读取后的图像处理) 四.opencv图像处理系列:国内车辆牌照检测识别系统(万份测试准确率99.7%以上

基于SVM与人工神经网络的车牌识别系统

最近研究了支持向量机(Support Vector Machine,SVM)和人工神经网络(Artifical Neural Network,ANN)等模式识别理论,结合OpenCV的书:<Mastering OpenCV with Practical Computer Vision Projects>,将两种思想运用到车辆的车牌识别算法中.车辆识别结合了多种图像处理技术,如视频监控.图像检测.图像分割和光学字符识别(OCR)等,在道路交通监控中有着重要的作用.以下内容主要包含几个方面: 车牌

EasyPR--中文开源车牌识别系统 开发详解(2)车牌定位

这篇文章是一个系列中的第三篇.前两篇的地址贴下:介绍.详解1.我撰写这系列文章的目的是:1.普及车牌识别中相关的技术与知识点:2.帮助开发者了解EasyPR的实现细节:3.增进沟通. EasyPR的项目地址在这:GitHub.要想运行EasyPR的程序,首先必须配置好openCV,具体可以参照这篇文章. 在前两篇文章中,我们已经初步了解了EasyPR的大概内容,在本篇内容中我们开始深入EasyRP的程序细节.了解EasyPR是如何一步一步实现一个车牌的识别过程的.根据EasyPR的结构,我们把它

关于车牌识别的工作原理和技术参数

综合网上上各种车牌识别方法,总结出一个较为简单的车牌识别方案,采用VS2013+OpenCv2.4.9实现.并且附上可运行的源代码以及测试图片和视频,详细参数设置请参照源代码.识别部分的训练样本见我上传的资源. 实现方法 (一) 检测车辆(基于混合高斯模型的背景差分法) 读取视频(avi格式),选定目标区域框用于检测车辆 检测车辆,基于混合高斯模型的背景差分法检测前景,经过腐蚀.膨胀后,若像素值大于200的像素点数大于80000且上一帧像素点数小于80000,则视为检测出车辆并保存改区域的图片

目标检测---搬砖一个ALPR自动车牌识别的环境

参考License Plate Detection and Recognition in Unconstrained Scenarios@https://www.cnblogs.com/greentomlee/p/10863363.html@https://github.com/sergiomsilva/alpr-unconstrained 环境The current version was tested in an Ubuntu 16.04 machine, with Keras 2.2.4,

车牌识别及验证码识别的一般思路

http://www.pin5i.com/showtopic-22246.html 描述一下思路及算法. 全文分两部分,第一部分讲车牌识别及普通验证码这一类识别的普通方法,第二部分讲对类似QQ验证码,Gmail验证码这一类变态验证码的识别方法和思路. 一.车牌/验证码识别的普通方法 车牌.验证码识别的普通方法为: (1)      将图片灰度化与二值化 (2)      去噪,然后切割成一个一个的字符 (3)      提取每一个字符的特征,生成特征矢量或特征矩阵 (4)      分类与学习.

快号通车牌识别

北京文通科技有限公司推出新版移动端车牌识别App"快号通",该产品支持Android.iOS平台,支持接口开发.通过智能手机或Pad的摄像头对准车牌,采用视频预览模式识别,实现自动采集车牌信息. 旧版的文通车牌识别软件,是拍照识别模式,用户需要手动拍摄一张车牌图片,然后进行识别.而新版"快号通"可以像扫二维码一样,扫描识别车牌,方便.快速.准确,大大提升用户体验. 技术参数: 支持平台 Android2.3以上.iOS6.0以上 支持二次开发 提供Android开发