An On-line Method for Multi-license Plates Recognition Based on Neural Network and Support Vector Machine
-
摘要: 针对道路交通多车牌识别问题, 提出了一种快速鲁棒的多车牌检测识别方法, 包括多车牌检测和车牌字符识别两部分:构造BP (Back-Propagation)神经网络模型用于颜色识别, 结合图像形态学运算方法, 筛选候选车牌目标, 基于支持矢量机从候选车牌目标中判别真正的车牌目标; 通过轮廓尺寸判断, 并结合车牌尺寸特征, 依次分割提取城市代码字符块、省份代码字符块及5位机动车编码字符块, 最后基于BP神经网络识别字符块内容.基于上述原理, 开发了鲁棒的多机动车车牌自动检测识别系统, 并在真实场景中进行了实验测试, 结果表明: 1)车辆在正常速度行驶条件下, 系统依然可以保证90%以上的车牌检测识别正确率; 2)系统可实现同时多车牌检测识别; 3)文中实验硬件配置下, 系统单幅图像检测识别平均时间低于130 ms, 处理频率约8 Hz.Abstract: Aiming at the problem of multi-license plate recognition, a fast and robust method is proposed in this paper, including multi-license plate location and character recognition. A back-propagation neural network is built to identify colors, which combines image morphology to detect candidate plates. Based on support vector machine (SVM), the real license plate can be distinguished from candidate license plates. By combining the judgment of contour size and license plate size feature, the character blocks can be segmented and extracted in turns. Finally, back-propagation neural network is used to recognize all the text blocks. With the above principle, a robust system for automatic multi-license plate recognition is developed and its performance has been validated by experiments. The results indicate that: 1) The system can still get a high correct rate more than 90% under the condition that cars are traveling at normal speed; 2) The system can recognize multi-license plates simultaneously; 3) The average time cost of processing single frame is less than 130 ms and the frequency of the system can reach 8 Hz under the current configuration.
-
Key words:
- Multi-license plates recognition /
- back-propagation neural network /
- support vector machine /
- color identification /
- character segment
1) 本文责任编委 金连文 -
表 1 BP神经网络训练参数设置
Table 1 Training parameters of BP neural network
$Mat\ layers(1, \ 3, \ CV\_\, 32SC1);$ $layers.at \langle int\rangle (0) = 7;$ //输入层单元数量 $layers.at \langle int\rangle (1) = 11;$ //隐藏层神经元数量 $layers.at \langle int\rangle (2) = 5;$ //输出层单元数量 $CvANN\_\, MLP\_\, TrainParams \ params;$ //参数 $params.train\_\, method \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;= \\CvANN\_\, MLP\_\, TrainParams\;\;::\\BACKPROP; $ //训练方法 $params.bp\_\, moment\_\, scale = 0.1; $ //动力项因子 $params.bp\_\, dw\_\, scale = 0.1; $ //梯度项因子 表 2 候选车牌筛选算法
Table 2 Filter of candidate plates
$Require: contours$ //为查找到的目标轮廓集合 $Require: rect\_\, $ //为轮廓对应的最小外接矩 $Require: minAreaRect$ //为用于计算最小外接矩的函数 $Require: thresh\_\, min$ //为车牌长宽比判断阈值下界 $Require: thresh\_\, max$ //为车牌长宽比判断阈值上界 $Require: k$ //为查找到的目标轮廓数 $Require: recsults$ //为经过尺寸筛选后得到的候选车牌集合 for $i$ from 1 to $k$ do $rect\_\, \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;=\\ minAreaRect(contours[i])$ $if\; rect\_\, .height / rect\_\, .width > \\thresh\_\, min \&\& rect\_\, .height / rect\_\, .width <$ $ thresh\_\, max do$ $results$←$rect$ end if end for Return results 表 3 SVM训练参数设置
Table 3 Training parameters of SVM
$CvSVMParams\ SVM\_\, params;$ $SVM\_\, params.svm\_\, type \;\;= \\CvSVM::C\_\, SVC;$ $SVM\_\, params.kernel\_\, type \;\;= \\CvSVM::RBF;$ //CvSVM::RBF径向基函数, 也就是高斯核 $SVM\_\, params.degree = 0.1;$ //内核函数参数 $SVM\_\, params.gamma = 1;$ //内核函数参数 $SVM\_\, params.coef0 = 0.1;$ //内核函数参数 $SVM\_\, params.C = 1;$ //SVM类型参数 $SVM\_\, params.nu = 0.1;$ //SVM类型参数 $SVM\_\, params.p = 0.1;$ //SVM类型参数 表 4 BP神经网络训练参数设置
Table 4 Training parameters of BP neural network
$Mat\ layers(1, \ 3, \ CV\_\, 32SC1);$ $layers.at\langle int\rangle(0) = 173;$ //输入层单元数量 $layers.at\langle int\rangle(1) = 41;$ //隐藏层神经元数量 $layers.at\langle int\rangle (2) = 65;$ //输出层单元数量 $CvANN\_\, MLP\_\, TrainParams \ params;$ //参数 $params.train\_\, method \;\;\;\;\;\;\;\;\;= \\CvANN\_\, MLP\_\, TrainParams\;\;\;::\\BACKPROP;$ //训练方法 $params.bp\_\, moment\_\, scale = 0.1;$ //动力项因子 $params.bp\_\, dw\_\, scale = 0.1;$ //梯度项因子 -
[1] 陈刚, 陈斌, 钱基德.车载移动执法中违规车辆智能检测研究.电子科技大学学报, 2018, 47(3): 350-355 doi: 10.3969/j.issn.1001-0548.2018.03.005Chen Gang, Chen Bin, Qian Ji-De. Research on automated detection model and key technology in traffic enforcement on mobile system. Journal of University of Electronic Science and Technology of China, 2018, 47(3): 350-355 doi: 10.3969/j.issn.1001-0548.2018.03.005 [2] 徐凯.复杂背景下车牌识别算法的研究与实现[硕士学位论文], 电子科技大学, 中国, 2017Xu Kai. Research and implementation of license plate recognition algorithm on complex background[Master thesis], University of Electronic and Technology, China, 2017 [3] 杨柳风.复杂背景下车牌识别算法的研究[硕士学位论文], 大连海事大学, 中国, 2018Yang Liu-Feng. Research on the algorithm of license plate recognition in complex scenes[Master thesis], Dalian Maritime University, China, 2018 [4] 王艳, 谢广苏, 沈晓宇.一种基于MSER和SWT的新型车牌检测识别方法研究.计量学报, 2019, 40(1): 82-90 https://www.cnki.com.cn/Article/CJFDTOTAL-JLXB201901013.htmWang Yan, Xie Guang-Su, Shen Xiao-Yu. A new vehicle licence plate recognition method based on MSER and SWT. Acta Metrologica Sinica, 2019, 40(1): 82-90 https://www.cnki.com.cn/Article/CJFDTOTAL-JLXB201901013.htm [5] 余烨, 金强, 傅云翔, 路强.基于Fg-CarNet的车辆型号精细分类研究.自动化学报, 2018, 44(10): 1864-1875 doi: 10.16383/j.aas.2017.c170109Yu Ye, Jin Qiang, Fu Yun-Xiang, Lu Qiang. Fine-grained classification of car models using Fg-CarNet convolutional neural network. Acta Automatica Sinica, 2018, 44(10): 1864-1875 doi: 10.16383/j.aas.2017.c170109 [6] Ashtari A H, Nordin M J, Fathy M. An Iranian license plate recognition system based on color features. IEEE Transactions on Intelligent Transportation System, 2014, 15(4): 1690-1705 doi: 10.1109/TITS.2014.2304515 [7] Yuan X, Hao X L, Chen H J. Robust traffic sign recognition based on color global and local oriented edge magnitude patterns. IEEE Transactions on Intelligent Transportation System, 2014, 15(4): 1466-1477 doi: 10.1109/TITS.2014.2298912 [8] Wang F, Zhang D X, Man L C. Comparison of Immune and Genetic Algorithms for Parameter Optimization of Plate Color Recognition. In: Proceedings of the 2011 IEEE International Conference on Progress in Informatics & Computing. New York, USA: IEEE, 2011. [9] 胡峰松, 朱浩.基于HIS颜色空间和行扫描的车牌定位算法.计算机工程与设计, 2015, 36(4): 145-150 https://www.cnki.com.cn/Article/CJFDTOTAL-SJSJ201504027.htmHu Feng-Song, Zhu Hao. License plate location algorithm based on HSI color space and line scanning. Computer Engineering and Design, 2015, 36(4): 145-150 https://www.cnki.com.cn/Article/CJFDTOTAL-SJSJ201504027.htm [10] 马永杰, 李欢, 刘姣姣.基于HSV和MB_LBP特征的级联Adaboost车牌检测方法.四川大学学报, 2018, 55(2): 290-294 doi: 10.3969/j.issn.0490-6756.2018.02.013Ma Yong-Jie, Li Huan, Liu Jiao-Jiao. Detection algorithm of cascaded adaboost license plate based on HSV color model and MB_LBP features. Journal of Sichuan University, 2018, 55(2): 290-294 doi: 10.3969/j.issn.0490-6756.2018.02.013 [11] 王剑书, 樊养余, 张辰锐.基于左上边缘点检测的快速车牌定位算法.计算机仿真, 2013, 30(11): 149-153 https://www.cnki.com.cn/Article/CJFDTOTAL-JSJZ201311032.htmWang Jian-Shu, Fan Yang-Yu, Zhang Chen-Rui. Fast algorithm for vehicle license plate location based on left-up edge-point detection. Computer Simulation, 2013, 30(11): 149-153 https://www.cnki.com.cn/Article/CJFDTOTAL-JSJZ201311032.htm [12] 董峻妃.基于卷积神经网络的车牌区域检测和车牌字符识别研究[硕士学位论文], 西华师范大学, 中国, 2018Dong Jun-Fei. Research on license plate area detection and license plate character recognition based on convolution neural network[Master thesis], West Normal University, China, 2018 [13] 王宁, 段振云, 赵文辉.基于Bertrand曲面模型的边缘检测算法.光子学报, 2017, 46(10): 1012003 https://www.cnki.com.cn/Article/CJFDTOTAL-GZXB201710025.htmWang Ning, Duan Zhen-Yun, Zhao Wen-Hui. Algorithm of edge detection based on bertrand surface model. Acta Photonica Sinica, 2017, 46(10): 1012003 https://www.cnki.com.cn/Article/CJFDTOTAL-GZXB201710025.htm [14] Pun C M, Ho W Y. An Edge-Based Macao License Plate Recognition System. International Journal of Computational Intelligence Systems, 2011, 4(2): 244-254 doi: 10.1080/18756891.2011.9727780 [15] Azad R, Shayegh H R. New method for optimization of license plate recognition system with use of edge detection and connected component. In: Proceedings of the 2013 International Conference on Computer & Knowledge Engineering. Mashhad, Iran, 2013. [16] 霍祥湖.基于卷积神经网络的车牌识别技术研究[硕士学位论文], 电子科技大学, 中国, 2017Huo Xiang-Hu. License plate recognition based convolutional neural network[Master thesis], University of Electronic Science and Technology, China, 2017 [17] 郭航宇, 景晓军, 尚勇.基于小波变换和数学形态法的车牌定位方法研究.计算机技术发展, 2010, 20(5): 19-22 https://www.cnki.com.cn/Article/CJFDTOTAL-WJFZ201005005.htmGuo Hang-Yu, Jing Xiao-Jun, Shang Yong. License plate location method based on wavelet transform and methematical morphology. Computer Technology and Development, 2010, 20(5): 19-22 https://www.cnki.com.cn/Article/CJFDTOTAL-WJFZ201005005.htm [18] 方万元, 梁久帧.复杂背景下快速车牌定位算法.计算机工程与应用, 2012, 48(2): 160-163 https://www.cnki.com.cn/Article/CJFDTOTAL-JSGG201202047.htmFang Wan-Yuan, Liang Jiu-Zhen. Fast algorithm of license plate location under complex background. Computer Engineering and Application, 2012, 48(2): 160-163 https://www.cnki.com.cn/Article/CJFDTOTAL-JSGG201202047.htm [19] Song Q K, Yuan H J, Zhou T. License Plate Recognition Based on Mathematical Morphology Method and RBF Neural Network. In: Proceedings of the 2012 International Conference on Measurement. Harbin, China, 2012. [20] Rabee A, Barhumi I. License plate detection and recognition in complex scenes using mathematical morphology and support vector machines. In: Proceedings of the 2014 International Conference on Systems. Dubrovnik, Croatia, 2014. [21] 姜文涛, 刘万军, 袁姮.基于曲量场空间的车牌定位与识别.电子学报, 2011, 39(11): 84-90 https://www.cnki.com.cn/Article/CJFDTOTAL-DZXU201111014.htmJiang Wen-Tao, Liu Wan-Jun, Yuan Heng. Vehicle license plate location and identifying based on the curved field space. Acta Electronic Sinica, 2011, 39(11): 84-90 https://www.cnki.com.cn/Article/CJFDTOTAL-DZXU201111014.htm [22] 任骏, 黄丹丹, 李志能.结合纹理分析和支撑矢量机的汽车牌照定位研究.浙江大学学报, 2006, 40(8): 66-71 https://www.cnki.com.cn/Article/CJFDTOTAL-ZDZC200608013.htmRen Jun, Huang Dan-Dan, Li Zhi-Neng. License plate locating using support vector machines and texture analysis. Journal of Zhejiang University, 2006, 40(8): 66-71 https://www.cnki.com.cn/Article/CJFDTOTAL-ZDZC200608013.htm [23] Dehkordi M Y, Nikzad M, Ekhlas V R. A novel approach for fast and robust multiple license plate detection. In: Proceedings of Machine Vision & Image Processing, Isfahan, Iran, 2011 [24] 马爽, 樊养余, 雷涛.一种基于多特征提取的实用车牌识别方法.计算机应用研究, 2013, 30(11): 301-305Ma Shuang, Fan Yang-Yu, Lei Tao, Wu Peng. Practical license plate recognition method based on multi-feature extraction. Application Research of Computers, 2013, 30(11): 301-305 [25] Jiang X, Huang Y D, Li G Q. Fusion of texture features and color information of the license plate location algorithm. In: Proceedings of the 2012 International Conference on Wavelet Analysis & Pattern Recognition, Xi$'$an, China, 2012 [26] 耿庆田, 赵宏伟.基于分形维数和隐马尔科夫特征的车牌识别.光学精密工程, 2013, 21(12): 216-222 https://www.cnki.com.cn/Article/CJFDTOTAL-GXJM201312029.htmGeng Qing-Tian, Zhao Hong-Wei. License plate recognition based on fractal and hidden Markov feature. Optics and Precision Engineering, 2013, 21(12): 216-222 https://www.cnki.com.cn/Article/CJFDTOTAL-GXJM201312029.htm [27] 凌翔, 赖锟, 王昔鹏.基于模板匹配方法的不均匀照度车牌图像识别.重庆交通大学学报, 2018, 37(8): 102-106 https://www.cnki.com.cn/Article/CJFDTOTAL-CQJT201808017.htmLing Xiang, Lai Kun, Wang Xi-Peng. Uneven illumination license plate image recognition base on template matching method. Journal of Chongqing Jiaotong University, 2018, 37(8): 102-106 https://www.cnki.com.cn/Article/CJFDTOTAL-CQJT201808017.htm [28] 苗立刚.基于最近邻链的车牌检测算法.自动化学报, 2011, 37(10): 118-125 doi: 10.3724/SP.J.1004.2011.01272Miao Li-Gang. License plate detection algorithm based on nearest neighbor chains. Acta Automatica Sinica, 2011, 37(10): 118-125 doi: 10.3724/SP.J.1004.2011.01272 [29] 魏亭, 邱实, 李晨, 王锐.计算机多尺度辅助定位车牌算法.电子学报, 2018, 46(9): 2188-2193 https://www.cnki.com.cn/Article/CJFDTOTAL-DZXU201809020.htmWei Ting, Qiu Shi, Li Chen, Wang Rui. License plate detection algorithm based on computer multi scale assist. Acta Electronic Sinica, 2018, 46(9): 2188-2193 https://www.cnki.com.cn/Article/CJFDTOTAL-DZXU201809020.htm [30] Bhardwaj D, Kaur H. Comparison of ML algorithms for identification of Automated Number Plate Recognition. In: Proceedings of the 2015 International Conference on Reliability, Noida, India, 2015 [31] Shaikh Z A, Khan U A, Rajput M A. Machine Learning based Number Plate Detection and Recognition. In: Proceedings of the 2016 International Conference on Pattern Recognition Applications & Methods, Rome, Italy, 2016 [32] 李朝兵.基于深度学习的车牌识别关键技术研究[硕士学位论文], 电子科技大学, 中国, 2015Li Chao-Bing. Key technologies of license plate recognition based on deep learning[Master thesis], University of Electronic Science and Technology, China, 2015 [33] 迟晓君, 孟庆春.基于投影特征值的车牌字符分割算法.计算机应用研究, 2006, 46(7): 262-263 https://www.cnki.com.cn/Article/CJFDTOTAL-JSYJ200607088.htmChi Xiao-Jun, Meng Qing-Chun. Character segmentation of license plate based on projection and eigenvalue. Application Research of Computers, 2006, 46(7): 262-263 https://www.cnki.com.cn/Article/CJFDTOTAL-JSYJ200607088.htm [34] 王晶.基于神经网络的车牌识别技术研究[硕士学位论文], 电子科技大学, 中国, 2017Wang Jing. Research on license plate recognition technology based on neural network[Master thesis], Hangzhou Dianzi University, China, 2017 [35] 陈寅鹏, 丁晓青.复杂车辆图像中的车牌定位与字符分割方法.红外与激光工程, 2004, 33(1): 31-35Chen Yin-Peng, Ding Xiao-Qing. License-plate location and charater segmentation in complex vehicle images. Infrared and Laser Engineering, 2004, 33(1): 31-35