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 -o softcar -lm -static -O3
640x480BMP位图需要大概175ms
320x140BMP位图需要大概60ms
没有优化测试:
[email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/data #
O3优化后测试结果:
[email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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 [email protected]:/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以内处理单张车牌。
代码稍后提供
车牌识别--OMAP4430处理器上测试
时间: 2024-10-13 08:31:17