CN111582272A - Double-row license plate recognition method, device and equipment and computer readable storage medium - Google Patents
Double-row license plate recognition method, device and equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN111582272A CN111582272A CN202010371388.1A CN202010371388A CN111582272A CN 111582272 A CN111582272 A CN 111582272A CN 202010371388 A CN202010371388 A CN 202010371388A CN 111582272 A CN111582272 A CN 111582272A
- Authority
- CN
- China
- Prior art keywords
- license plate
- image
- feature
- double
- preset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 62
- 239000011159 matrix material Substances 0.000 claims abstract description 104
- 238000000605 extraction Methods 0.000 claims abstract description 69
- 238000013528 artificial neural network Methods 0.000 claims abstract description 19
- 230000000306 recurrent effect Effects 0.000 claims abstract description 19
- 230000002457 bidirectional effect Effects 0.000 claims abstract description 18
- 230000015654 memory Effects 0.000 claims description 18
- 238000011176 pooling Methods 0.000 claims description 17
- 238000003708 edge detection Methods 0.000 claims description 14
- 238000010606 normalization Methods 0.000 claims description 13
- 238000003702 image correction Methods 0.000 claims description 11
- 230000006798 recombination Effects 0.000 claims description 10
- 238000005215 recombination Methods 0.000 claims description 10
- 238000006243 chemical reaction Methods 0.000 claims 1
- 230000008521 reorganization Effects 0.000 abstract description 8
- 230000008569 process Effects 0.000 description 11
- 230000006870 function Effects 0.000 description 9
- 230000009466 transformation Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000013527 convolutional neural network Methods 0.000 description 3
- 230000011218 segmentation Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000006403 short-term memory Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/56—Extraction of image or video features relating to colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
- G06V10/267—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/146—Aligning or centring of the image pick-up or image-field
- G06V30/1475—Inclination or skew detection or correction of characters or of image to be recognised
- G06V30/1478—Inclination or skew detection or correction of characters or of image to be recognised of characters or characters lines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/148—Segmentation of character regions
- G06V30/153—Segmentation of character regions using recognition of characters or words
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/62—Text, e.g. of license plates, overlay texts or captions on TV images
- G06V20/625—License plates
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- General Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Biomedical Technology (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Biophysics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Health & Medical Sciences (AREA)
- Character Discrimination (AREA)
- Traffic Control Systems (AREA)
- Image Analysis (AREA)
Abstract
本发明提供一种双行车牌识别方法,涉及图像识别技术领域,该方法包括:获取待识别双行车牌的车牌图像;采用预设特征提取模型对所述车牌图像进行特征提取,得到车牌特征矩阵;对所述车牌特征矩阵进行特征重组,得到目标车牌特征;将所述目标车牌特征输入至预设深度双向递归神经网络中,得到所述待识别双行车牌的车牌识别结果。本发明还提供一种双行车牌识别装置、设备及计算机可读存储介质。本发明能够提高双行车牌识别结果的识别效率和准确性。
The invention provides a double-vehicle license plate recognition method, which relates to the technical field of image recognition. The method includes: acquiring a license plate image of a double-lane license plate to be recognized; using a preset feature extraction model to perform feature extraction on the license plate image to obtain a license plate feature matrix performing feature reorganization on the license plate feature matrix to obtain the target license plate feature; inputting the target license plate feature into a preset depth bidirectional recurrent neural network to obtain the license plate recognition result of the to-be-recognized dual-carriage license plate. The present invention also provides a dual-vehicle license plate recognition device, equipment and computer-readable storage medium. The invention can improve the recognition efficiency and accuracy of the double-vehicle license plate recognition result.
Description
技术领域technical field
本发明涉及图像识别技术领域,尤其涉及一种双行车牌识别方法、装置、设备及计算机可读存储介质。The present invention relates to the technical field of image recognition, and in particular, to a method, device, device, and computer-readable storage medium for recognizing dual-vehicle license plates.
背景技术Background technique
车牌识别是现代智能交通系统中的重要组成部分之一,应用十分广泛,如无人看管的停车场、禁区安全管制、交通执法、拥堵定价、自动收费等。根据我国的交通法规,车牌包括单行车牌和多行车牌,其中,单行车牌用于个人汽车、警车、军车、大使馆车、卡车、公共汽车等,而双行车牌用于公共汽车、乘用车、卡车、武装警车、摩托车等。License plate recognition is one of the important components of modern intelligent transportation systems, and is widely used, such as unattended parking lots, restricted area security control, traffic law enforcement, congestion pricing, automatic toll collection, etc. According to my country's traffic regulations, license plates include single-lane license plates and multi-lane license plates. Among them, single-lane license plates are used for personal cars, police cars, military vehicles, embassy cars, trucks, buses, etc., while double-lane license plates are used for buses and passenger cars. , trucks, armed police cars, motorcycles, etc.
目前,大多数车牌识别方法都只关注于单行车牌识别任务,只有少数方法考虑双行车牌。而这些方法通常需要把双行车牌分割成两部分,分别作为输入,具体来说,他们要求车牌每个字符都应该分割且正确识别,因此每个字符分割和识别精度会影响最终识别结果的准确性。因此,现有的双行车牌识别方法,识别过程的任务量较大,流程较为繁琐,且识别结果的准确性低。Currently, most license plate recognition methods only focus on the task of single-lane license plate recognition, and only a few methods consider double-lane license plates. These methods usually need to divide the double-column license plate into two parts, which are used as input respectively. Specifically, they require that each character of the license plate should be divided and correctly recognized. Therefore, the segmentation and recognition accuracy of each character will affect the accuracy of the final recognition result. sex. Therefore, in the existing dual-vehicle license plate recognition method, the task load of the recognition process is relatively large, the process is relatively complicated, and the accuracy of the recognition result is low.
发明内容SUMMARY OF THE INVENTION
本发明的主要目的在于提供一种双行车牌识别方法、装置、设备及计算机可读存储介质,旨在提高双行车牌识别结果的识别效率和准确性。The main purpose of the present invention is to provide a method, device, device and computer-readable storage medium for recognizing dual-vehicle license plates, aiming at improving the recognition efficiency and accuracy of the results of recognizing dual-vehicle license plates.
为实现上述目的,本发明提供一种双行车牌识别方法,所述双行车牌识别方法包括:In order to achieve the above object, the present invention provides a method for recognizing a dual-vehicle license plate, which includes:
获取待识别双行车牌的车牌图像;Obtain the license plate image of the double-carriage license plate to be recognized;
采用预设特征提取模型对所述车牌图像进行特征提取,得到车牌特征矩阵;Using a preset feature extraction model to perform feature extraction on the license plate image to obtain a license plate feature matrix;
对所述车牌特征矩阵进行特征重组,得到目标车牌特征;Perform feature reorganization on the license plate feature matrix to obtain the target license plate feature;
将所述目标车牌特征输入至预设深度双向递归神经网络中,得到所述待识别双行车牌的车牌识别结果。The feature of the target license plate is input into a preset depth bidirectional recurrent neural network to obtain the license plate recognition result of the double-carriage license plate to be recognized.
可选地,所述预设特征提取模型包括输入层、卷积层、池化层和归一化层;其中,Optionally, the preset feature extraction model includes an input layer, a convolution layer, a pooling layer and a normalization layer; wherein,
所述输入层用于接收所述待识别双行车牌的车牌图像;The input layer is used to receive the license plate image of the to-be-recognized dual-vehicle license plate;
所述卷积层用于根据卷积核提取所述车牌图像的图像特征矩阵;The convolution layer is used to extract the image feature matrix of the license plate image according to the convolution kernel;
所述池化层用于对所述卷积层的输出进行池化处理;The pooling layer is used for pooling the output of the convolutional layer;
所述归一化层用于对所述卷积层的输出进行归一化处理。The normalization layer is used for normalizing the output of the convolution layer.
可选地,所述对所述车牌特征矩阵进行特征重组,得到目标车牌特征的步骤包括:Optionally, the step of performing feature reorganization on the license plate feature matrix to obtain the target license plate feature includes:
按所述车牌特征矩阵的高度对所述车牌特征矩阵进行拆分,得到第一特征矩阵和第二特征矩阵;Splitting the license plate feature matrix according to the height of the license plate feature matrix to obtain a first feature matrix and a second feature matrix;
将所述第一特征矩阵与所述第二特征矩阵进行组合拼接,得到目标车牌特征。The first feature matrix and the second feature matrix are combined and spliced to obtain the target license plate feature.
可选地,所述将所述目标车牌特征输入至预设深度双向递归神经网络中,得到所述待识别双行车牌的车牌识别结果的步骤之后,还包括:Optionally, after the step of inputting the feature of the target license plate into a preset depth bidirectional recurrent neural network to obtain the license plate recognition result of the to-be-recognized dual-carriage license plate, the method further includes:
通过联接时间分类CTC算法对所述车牌识别结果进行处理,得到所述待识别双行车牌的的车牌信息。The license plate recognition result is processed through the connection time classification CTC algorithm to obtain the license plate information of the to-be-recognized double-carriage license plate.
可选地,所述采用预设特征提取模型对所述车牌图像进行特征提取,得到车牌特征矩阵的步骤之前,还包括:Optionally, before the step of using a preset feature extraction model to perform feature extraction on the license plate image to obtain a license plate feature matrix, the method further includes:
对所述车牌图像进行颜色统计,根据统计结果确定车牌号颜色;Perform color statistics on the license plate image, and determine the color of the license plate number according to the statistical results;
根据所述车牌号颜色确定车牌号像素坐标,并根据所述车牌号像素坐标确定车牌号有效区域;Determine the pixel coordinates of the license plate number according to the color of the license plate number, and determine the effective area of the license plate number according to the pixel coordinates of the license plate number;
根据所述车牌号有效区域对所述车牌图像进行裁剪,得到车牌号图像;The license plate image is cropped according to the effective area of the license plate number to obtain a license plate number image;
所述采用预设特征提取模型对所述车牌图像进行特征提取,得到车牌特征矩阵的步骤包括:The step of using a preset feature extraction model to perform feature extraction on the license plate image to obtain a license plate feature matrix includes:
采用预设特征提取模型对所述车牌号图像进行特征提取,得到车牌特征矩阵。A preset feature extraction model is used to perform feature extraction on the license plate number image to obtain a license plate feature matrix.
可选地,所述采用预设特征提取模型对所述车牌图像进行特征提取,得到车牌特征矩阵的步骤之前,还包括:Optionally, before the step of using a preset feature extraction model to perform feature extraction on the license plate image to obtain a license plate feature matrix, the method further includes:
对所述车牌图像进行图像校正处理,得到校正后的车牌图像;Perform image correction processing on the license plate image to obtain a corrected license plate image;
所述采用预设特征提取模型对所述车牌图像进行特征提取,得到车牌特征矩阵的步骤包括:The step of using a preset feature extraction model to perform feature extraction on the license plate image to obtain a license plate feature matrix includes:
采用预设特征提取模型对所述校正后的车牌图像进行特征提取,得到车牌特征矩阵。A preset feature extraction model is used to perform feature extraction on the corrected license plate image to obtain a license plate feature matrix.
可选地,所述对所述车牌图像进行图像校正处理,得到校正后的车牌图像的步骤包括:Optionally, the step of performing image correction processing on the license plate image to obtain a corrected license plate image includes:
通过非线性指数对车牌图像进行非线性灰度变换,得到变换后的车牌图像;Perform nonlinear grayscale transformation on the license plate image through nonlinear index to obtain the transformed license plate image;
通过预设边缘检测算法对所述变换后的车牌图像进行边缘检测,得到车牌字符外接框;Perform edge detection on the transformed license plate image by using a preset edge detection algorithm to obtain a license plate character bounding frame;
通过直线拟合建立所述车牌字符外接框对应的方程,并根据所述方程得到字符倾斜角度;The equation corresponding to the bounding box of the license plate character is established by straight line fitting, and the character inclination angle is obtained according to the equation;
基于所述字符倾斜角度对所述车牌图像进行旋转校正,得到校正后的车牌图像。The license plate image is rotated and corrected based on the character inclination angle to obtain a corrected license plate image.
此外,为实现上述目的,本发明还提供一种双行车牌识别装置,所述双行车牌识别装置包括:In addition, in order to achieve the above purpose, the present invention also provides a dual-vehicle license plate recognition device, the dual-vehicle license plate recognition device includes:
图像获取模块,用于获取待识别双行车牌的车牌图像;The image acquisition module is used to acquire the license plate image of the double-carriage license plate to be recognized;
特征提取模块,用于采用预设特征提取模型对所述车牌图像进行特征提取,得到车牌特征矩阵;a feature extraction module, configured to perform feature extraction on the license plate image by using a preset feature extraction model to obtain a license plate feature matrix;
特征重组模块,用于对所述车牌特征矩阵进行特征重组,得到目标车牌特征;a feature reorganization module, used for feature reorganization of the license plate feature matrix to obtain the target license plate feature;
车牌识别模块,用于将所述目标车牌特征输入至预设深度双向递归神经网络中,得到所述待识别双行车牌的车牌识别结果。The license plate recognition module is used to input the feature of the target license plate into a preset depth bidirectional recurrent neural network to obtain the license plate recognition result of the dual-carriage license plate to be recognized.
此外,为实现上述目的,本发明还提供一种双行车牌识别设备,所述双行车牌识别设备包括存储器、处理器以及存储在所述存储器上并可被所述处理器执行的双行车牌识别程序,其中所述双行车牌识别程序被所述处理器执行时,实现如上所述的双行车牌识别方法的步骤。In addition, in order to achieve the above object, the present invention also provides a dual-vehicle license plate recognition device, which includes a memory, a processor, and a dual-vehicle license plate stored in the memory and executed by the processor. A recognition program, wherein the dual-vehicle license plate recognition program, when executed by the processor, implements the steps of the dual-vehicle license plate recognition method as described above.
此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有双行车牌识别程序,其中所述双行车牌识别程序被处理器执行时,实现如上所述的双行车牌识别方法的步骤。In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium, on which a dual-vehicle license plate recognition program is stored, wherein when the dual-vehicle license plate recognition program is executed by a processor, the The steps of the method for recognizing the dual-vehicle license plate as described above.
本发明提供一种双行车牌识别方法、装置、设备及计算机可读存储介质,通过获取待识别双行车牌的车牌图像,采用预设特征提取模型对车牌图像进行特征提取,得到车牌特征矩阵;然后,对车牌特征矩阵进行特征重组,得到目标车牌特征;进而将目标车牌特征输入至预设深度双向递归神经网络中,得到待识别双行车牌的车牌识别结果。本中,可直接将待识别双行车牌的车牌图像作为一个整体进行输入,无需对车牌的每个字符进行分割、识别,相比于现有技术中对各个车牌字符进行单独识别,可节约工作量,提高识别效率。同时,本发明中可避免因单个字符分割错误而导致整个车牌识别错误,因此,本发明可提高双行车牌识别结果的准确性。The present invention provides a dual-vehicle license plate recognition method, device, equipment and computer-readable storage medium. By acquiring a license plate image of a dual-lane license plate to be recognized, a preset feature extraction model is used to extract features from the license plate image to obtain a license plate feature matrix; Then, the feature recombination is performed on the license plate feature matrix to obtain the target license plate feature; and then the target license plate feature is input into the preset depth bidirectional recurrent neural network to obtain the license plate recognition result of the double-carriage license plate to be recognized. In this paper, the license plate image of the double-carriage license plate to be recognized can be directly input as a whole, and there is no need to segment and recognize each character of the license plate. Compared with the separate identification of each license plate character in the prior art, it can save work. to improve the recognition efficiency. At the same time, the present invention can avoid the whole license plate recognition error caused by the segmentation error of a single character, therefore, the present invention can improve the accuracy of the double-carriage license plate recognition result.
附图说明Description of drawings
图1为本发明实施例方案涉及的硬件运行环境的设备结构示意图;1 is a schematic diagram of a device structure of a hardware operating environment involved in an embodiment of the present invention;
图2为本发明双行车牌识别方法第一实施例的流程示意图;FIG. 2 is a schematic flowchart of the first embodiment of the method for recognizing dual-vehicle license plates according to the present invention;
图3为本发明双行车牌识别装置第一实施例的功能模块示意图。FIG. 3 is a schematic diagram of the functional modules of the first embodiment of the dual-vehicle license plate recognition device according to the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
参照图1,图1为本发明实施例方案涉及的硬件运行环境的设备结构示意图。Referring to FIG. 1 , FIG. 1 is a schematic diagram of a device structure of a hardware operating environment involved in an embodiment of the present invention.
本发明实施例涉及的双行车牌识别设备可以是PC(personal computer,个人计算机)、笔记本电脑、服务器等具有显示和处理功能的终端设备。The dual-vehicle license plate recognition device involved in the embodiment of the present invention may be a terminal device with display and processing functions, such as a PC (personal computer, personal computer), a notebook computer, and a server.
如图1所示,该双行车牌识别设备可以包括:处理器1001,例如CPU(CentralProcessing Unit,中央处理器),通信总线1002,用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信;用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如无线保真Wireless-Fidelity,Wi-Fi接口);存储器1005可以是高速随机存取存储器(random accessmemory,RAM),也可以是稳定的存储器(non-volatile memory),例如磁盘存储器,存储器1005可选的还可以是独立于前述处理器1001的存储装置。本领域技术人员可以理解,图1中示出的双行车牌识别设备结构并不构成对双行车牌识别设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。As shown in FIG. 1 , the dual-vehicle license plate recognition device may include: a
继续参照图1,图1中作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块以及双行车牌识别程序。在图1中,网络通信模块可用于连接服务器,与服务器进行数据通信;而处理器1001可以用于调用存储器1005中存储的双行车牌识别程序,并执行以下操作:Continuing to refer to FIG. 1 , the
获取待识别双行车牌的车牌图像;Obtain the license plate image of the double-carriage license plate to be recognized;
采用预设特征提取模型对所述车牌图像进行特征提取,得到车牌特征矩阵;Using a preset feature extraction model to perform feature extraction on the license plate image to obtain a license plate feature matrix;
对所述车牌特征矩阵进行特征重组,得到目标车牌特征;Perform feature reorganization on the license plate feature matrix to obtain the target license plate feature;
将所述目标车牌特征输入至预设深度双向递归神经网络中,得到所述待识别双行车牌的车牌识别结果。The feature of the target license plate is input into a preset depth bidirectional recurrent neural network to obtain the license plate recognition result of the double-carriage license plate to be recognized.
进一步地,所述预设特征提取模型包括输入层、卷积层、池化层和归一化层;其中,Further, the preset feature extraction model includes an input layer, a convolution layer, a pooling layer and a normalization layer; wherein,
所述输入层用于接收所述待识别双行车牌的车牌图像;The input layer is used to receive the license plate image of the to-be-recognized dual-vehicle license plate;
所述卷积层用于根据卷积核提取所述车牌图像的图像特征矩阵;The convolution layer is used to extract the image feature matrix of the license plate image according to the convolution kernel;
所述池化层用于对所述卷积层的输出进行池化处理;The pooling layer is used for pooling the output of the convolutional layer;
所述归一化层用于对所述卷积层的输出进行归一化处理。The normalization layer is used for normalizing the output of the convolution layer.
进一步地,处理器1001可以调用存储器1005中存储的双行车牌识别程序,还执行以下操作:Further, the
按所述车牌特征矩阵的高度对所述车牌特征矩阵进行拆分,得到第一特征矩阵和第二特征矩阵;Splitting the license plate feature matrix according to the height of the license plate feature matrix to obtain a first feature matrix and a second feature matrix;
将所述第一特征矩阵与所述第二特征矩阵进行组合拼接,得到目标车牌特征。The first feature matrix and the second feature matrix are combined and spliced to obtain the target license plate feature.
进一步地,处理器1001可以调用存储器1005中存储的双行车牌识别程序,还执行以下操作:Further, the
通过联接时间分类CTC算法对所述车牌识别结果进行处理,得到所述待识别双行车牌的的车牌信息。The license plate recognition result is processed through the connection time classification CTC algorithm to obtain the license plate information of the to-be-recognized double-carriage license plate.
进一步地,处理器1001可以调用存储器1005中存储的双行车牌识别程序,还执行以下操作:Further, the
对所述车牌图像进行颜色统计,根据统计结果确定车牌号颜色;Perform color statistics on the license plate image, and determine the color of the license plate number according to the statistical results;
根据所述车牌号颜色确定车牌号像素坐标,并根据所述车牌号像素坐标确定车牌号有效区域;Determine the pixel coordinates of the license plate number according to the color of the license plate number, and determine the effective area of the license plate number according to the pixel coordinates of the license plate number;
根据所述车牌号有效区域对所述车牌图像进行裁剪,得到车牌号图像;The license plate image is cropped according to the effective area of the license plate number to obtain a license plate number image;
采用预设特征提取模型对所述车牌号图像进行特征提取,得到车牌特征矩阵。A preset feature extraction model is used to perform feature extraction on the license plate number image to obtain a license plate feature matrix.
进一步地,处理器1001可以调用存储器1005中存储的双行车牌识别程序,还执行以下操作:Further, the
对所述车牌图像进行图像校正处理,得到校正后的车牌图像;Perform image correction processing on the license plate image to obtain a corrected license plate image;
采用预设特征提取模型对所述校正后的车牌图像进行特征提取,得到车牌特征矩阵。A preset feature extraction model is used to perform feature extraction on the corrected license plate image to obtain a license plate feature matrix.
进一步地,处理器1001可以调用存储器1005中存储的双行车牌识别程序,还执行以下操作:Further, the
通过非线性指数对车牌图像进行非线性灰度变换,得到变换后的车牌图像;Perform nonlinear grayscale transformation on the license plate image through nonlinear index to obtain the transformed license plate image;
通过预设边缘检测算法对所述变换后的车牌图像进行边缘检测,得到车牌字符外接框;Perform edge detection on the transformed license plate image by using a preset edge detection algorithm to obtain a license plate character bounding frame;
通过直线拟合建立所述车牌字符外接框对应的方程,并根据所述方程得到字符倾斜角度;The equation corresponding to the bounding box of the license plate character is established by straight line fitting, and the character inclination angle is obtained according to the equation;
基于所述字符倾斜角度对所述车牌图像进行旋转校正,得到校正后的车牌图像。The license plate image is rotated and corrected based on the character inclination angle to obtain a corrected license plate image.
基于上述硬件结构,提出本发明双行车牌识别方法的各个实施例。Based on the above-mentioned hardware structure, various embodiments of the method for recognizing dual-vehicle license plates of the present invention are proposed.
本发明提供一种双行车牌识别方法。The present invention provides a method for recognizing a double vehicle license plate.
请参照图2,图2为本发明双行车牌识别方法第一实施例的流程示意图。Please refer to FIG. 2 . FIG. 2 is a schematic flowchart of a first embodiment of a method for recognizing dual-vehicle license plates according to the present invention.
在本实施例中,该双行车牌识别方法包括:In this embodiment, the dual-vehicle license plate recognition method includes:
步骤S10,获取待识别双行车牌的车牌图像;Step S10, obtaining the license plate image of the double-carriage license plate to be recognized;
在本实施例中,该双行车牌识别方法由双行车牌识别设备实现,该双行车牌识别设备可以是PC、笔记本电脑、服务器等设备,该双行车牌识别设备以服务器为例进行说明。In this embodiment, the dual-vehicle license plate recognition method is implemented by a dual-lane license plate recognition device, which may be a PC, a notebook computer, a server, etc. The dual-lane license plate recognition device is described by taking a server as an example.
在本实施例中,先获取待识别双行车牌的车牌图像。In this embodiment, the license plate image of the double-carriage license plate to be recognized is obtained first.
步骤S20,采用预设特征提取模型对所述车牌图像进行特征提取,得到车牌特征矩阵;Step S20, using a preset feature extraction model to perform feature extraction on the license plate image to obtain a license plate feature matrix;
然后,采用预设特征提取模型对车牌图像进行特征提取,得到车牌特征矩阵。其中,该预设特征提取模型的类型可选为卷积神经网络模型,所述预设特征提取模型包括输入层、卷积层、池化层和归一化层;其中,Then, a preset feature extraction model is used to perform feature extraction on the license plate image to obtain a license plate feature matrix. Wherein, the type of the preset feature extraction model can be selected as a convolutional neural network model, and the preset feature extraction model includes an input layer, a convolution layer, a pooling layer and a normalization layer; wherein,
所述输入层用于接收所述待识别双行车牌的车牌图像;The input layer is used to receive the license plate image of the to-be-recognized dual-vehicle license plate;
所述卷积层用于根据卷积核提取所述车牌图像的图像特征矩阵;The convolution layer is used to extract the image feature matrix of the license plate image according to the convolution kernel;
所述池化层用于对所述卷积层的输出进行池化处理;The pooling layer is used for pooling the output of the convolutional layer;
所述归一化层用于对所述卷积层的输出进行归一化处理。The normalization layer is used for normalizing the output of the convolution layer.
具体的,该预设特征提取模型(即卷积神经网络模型)包括1个输入层(Input)、7个卷积层(Conv)、4个池化层(Pool)和2个归一化层(BatchNorm),各层结构的维度和配置参数如下表1,其中,维度分别表示通道数x高x宽,配置参数中的K、S、P分别表示卷积核大小、步长和padding(填充)的数目。其中,输入层用于接收待识别双行车牌的车牌图像,卷积层用于根据卷积核提取车牌图像的图像特征矩阵;池化层用于对卷积层的输出进行池化处理,即提取出每个图像特征矩阵中最能代表图像局部特征的图像特征值,归一化层用于对卷积层的输出进行归一化处理。此外,该卷积神经网络模型还可以增加zero-padding(零填充)层,以利用zero-padding方法来对特征图进行零填充操作,以补充边界,从而可保证从该层输出特征图的空域大小不变。Specifically, the preset feature extraction model (ie, the convolutional neural network model) includes 1 input layer (Input), 7 convolution layers (Conv), 4 pooling layers (Pool) and 2 normalization layers (BatchNorm), the dimensions and configuration parameters of each layer structure are shown in Table 1, where the dimensions represent the number of channels x height x width, respectively, and K, S, and P in the configuration parameters represent the size of the convolution kernel, step size, and padding (filling), respectively. )Number of. Among them, the input layer is used to receive the license plate image of the license plate to be recognized, the convolution layer is used to extract the image feature matrix of the license plate image according to the convolution kernel; the pooling layer is used to pool the output of the convolution layer, that is The image feature value that can best represent the local features of the image in each image feature matrix is extracted, and the normalization layer is used to normalize the output of the convolution layer. In addition, the convolutional neural network model can also add a zero-padding (zero-padding) layer to use the zero-padding method to perform zero-padding operations on the feature map to complement the boundary, thereby ensuring the output of the feature map from this layer. Size does not change.
在通过预设特征提取模型进行特征提取之后,所得到的车牌特征矩阵的维度为512x2x12,即为一个高度为2的矩阵。After feature extraction is performed by the preset feature extraction model, the obtained license plate feature matrix has a dimension of 512x2x12, which is a matrix with a height of 2.
表1预设特征提取模型的网络结构Table 1 Network structure of preset feature extraction model
步骤S30,对所述车牌特征矩阵进行特征重组,得到目标车牌特征;Step S30, performing feature reorganization on the license plate feature matrix to obtain the target license plate feature;
在得到车牌特征矩阵之后,对车牌特征矩阵进行特征重组,得到目标车牌特征。After obtaining the license plate feature matrix, perform feature recombination on the license plate feature matrix to obtain the target license plate feature.
具体的,步骤S30包括:Specifically, step S30 includes:
步骤a31,按所述车牌特征矩阵的高度对所述车牌特征矩阵进行拆分,得到第一特征矩阵和第二特征矩阵;Step a31, splitting the license plate feature matrix according to the height of the license plate feature matrix to obtain a first feature matrix and a second feature matrix;
步骤a32,将所述第一特征矩阵与所述第二特征矩阵进行组合拼接,得到目标车牌特征。Step a32, combining and splicing the first feature matrix and the second feature matrix to obtain the target license plate feature.
按车牌特征矩阵的高度对车牌特征矩阵进行拆分,得到第一特征矩阵和第二特征矩阵。即,将上述得到的维度为512x2x12的车牌特征矩阵按高度进行拆分,得到两个矩阵维度为512x1x12的特征矩阵,将基于车牌特征矩阵的第一行得到的特征矩阵记为第一特征矩阵,基于车牌特征矩阵的第二行得到的特征矩阵记为第二特征矩阵。然后,将第一特征矩阵与第二特征矩阵进行组合拼接,得到目标车牌特征。在组合拼接时,将第一特征矩阵与第二特征矩阵重新水平组合,重组后的矩阵维度为512x1x24,即重组得到高度为1的目标车牌特征。The license plate feature matrix is split according to the height of the license plate feature matrix to obtain the first feature matrix and the second feature matrix. That is, the obtained license plate feature matrix with a dimension of 512x2x12 is divided by height to obtain two feature matrices with a matrix dimension of 512x1x12, and the feature matrix obtained based on the first row of the license plate feature matrix is recorded as the first feature matrix, The feature matrix obtained based on the second row of the license plate feature matrix is denoted as the second feature matrix. Then, the first feature matrix and the second feature matrix are combined and spliced to obtain the target license plate feature. When combining and splicing, the first feature matrix and the second feature matrix are recombined horizontally, and the dimension of the recombined matrix is 512x1x24, that is, the target license plate feature with a height of 1 is obtained by recombination.
步骤S40,将所述目标车牌特征输入至预设深度双向递归神经网络中,得到所述待识别双行车牌的车牌识别结果。Step S40, inputting the feature of the target license plate into a preset depth bidirectional recurrent neural network to obtain the license plate recognition result of the dual-carriage license plate to be recognized.
最后,将目标车牌特征输入至预设深度双向递归神经网络中,得到待识别双行车牌的车牌识别结果。其中,预设深度双向递归神经网络可选地为双向长短期记忆网络(Bi-directional Long Short-Term Memory,Bi-LSTM)。可以理解,Bi-LSTM有能力从左到右处理特征信息,通过上下文信息,当前帧的处理结果与之前记忆和忘记结果融合,从而能够进行预测,并且能够将结构传递给后续的帧。而双行车牌在重新组合后也是一个字符序列,具有从左到右的时序特征,因此可以采用双向递归神经网络进行车牌字符识别。Finally, the feature of the target license plate is input into the preset depth bidirectional recurrent neural network, and the license plate recognition result of the double-carriage license plate to be recognized is obtained. The preset depth bidirectional recurrent neural network is optionally a bidirectional long short-term memory network (Bi-directional Long Short-Term Memory, Bi-LSTM). It can be understood that Bi-LSTM has the ability to process feature information from left to right. Through context information, the processing results of the current frame are fused with the previous memory and forgetting results, so that predictions can be made and the structure can be passed to subsequent frames. The double-carriage license plate is also a character sequence after recombination, which has the time sequence characteristics from left to right, so the two-way recurrent neural network can be used for license plate character recognition.
需要说明的是,单向的递归神经网络(Recurrent Neural Network,RNN)的问题在于只可以使用t时刻之前的信息,但是有时可能还需要使用将来的信息。而双向RNN模型可以解决这个问题。双向RNN在任何时候都保持两个隐藏层,一个隐藏层用于传输从左到右的信息,并使用另一个隐藏层对于从右到左的传播信息进行记录。因此,相比于采用单向的递归神经网络,本发明实施例通过采用预设深度双向递归神经网络可以提高识别结果的准确性。It should be noted that the problem of the one-way Recurrent Neural Network (RNN) is that it can only use the information before time t, but sometimes it may also need to use the information in the future. The bidirectional RNN model can solve this problem. A bidirectional RNN maintains two hidden layers at all times, one for transmitting information from left to right, and another for recording information transmitted from right to left. Therefore, compared with using a one-way recurrent neural network, the embodiment of the present invention can improve the accuracy of the recognition result by using a preset depth two-way recurrent neural network.
本发明提供一种双行车牌识别方法,通过获取待识别双行车牌的车牌图像,采用预设特征提取模型对车牌图像进行特征提取,得到车牌特征矩阵;然后,对车牌特征矩阵进行特征重组,得到目标车牌特征;进而将目标车牌特征输入至预设深度双向递归神经网络中,得到待识别双行车牌的车牌识别结果。本实施例中,可直接将待识别双行车牌的车牌图像作为一个整体进行输入,无需对车牌的每个字符进行分割、识别,相比于现有技术中对各个车牌字符进行单独识别,可节约工作量,提高识别效率。同时,本发明实施例中可避免因单个字符分割错误而导致整个车牌识别错误,因此,本发明实施例可提高双行车牌识别结果的准确性。The invention provides a double-vehicle license plate recognition method. By acquiring the license plate image of the double-vehicle license plate to be recognized, a preset feature extraction model is used to extract the characteristics of the license plate image to obtain a license plate feature matrix; then, the license plate feature matrix is reorganized, The target license plate feature is obtained; then the target license plate feature is input into the preset depth bidirectional recurrent neural network to obtain the license plate recognition result of the double-carriage license plate to be recognized. In this embodiment, the license plate image of the double-carriage license plate to be recognized can be directly input as a whole, and there is no need to segment and recognize each character of the license plate. Save workload and improve identification efficiency. At the same time, in the embodiment of the present invention, the entire license plate recognition error caused by the segmentation error of a single character can be avoided. Therefore, the embodiment of the present invention can improve the accuracy of the double-carriage license plate recognition result.
进一步地,基于上述第一实施例,提出本发明双行车牌识别方法的第二实施例。Further, based on the above-mentioned first embodiment, a second embodiment of the dual-vehicle license plate recognition method of the present invention is proposed.
本实施例中,在步骤S40之后,该双行车牌识别方法还包括:In this embodiment, after step S40, the dual-vehicle license plate recognition method further includes:
步骤A,通过联接时间分类CTC算法对所述车牌识别结果进行处理,得到所述待识别双行车牌的的车牌信息。In step A, the license plate recognition result is processed through the connection time classification CTC algorithm to obtain the license plate information of the dual-carriage license plate to be recognized.
本实施例中,由于车牌图像中的字符数量不同、字体样式不同、或大小不同,可能导致输出不一定能和每个字符一一对应,因此,为进一步保证识别结果的准确性,可通过CTC(Connectionist Temporal Classification,联接时间分类)算法对车牌识别结果进行处理,以进行字符对齐操作,得到最终的车牌信息其中,其中,CTC算法可将重复的元素合并,将空格符去除,可用于解决输入特征与输出标签的对齐问题。In this embodiment, because the number of characters in the license plate image is different, the font style is different, or the size is different, the output may not necessarily correspond to each character one-to-one. Therefore, in order to further ensure the accuracy of the recognition result, CTC The (Connectionist Temporal Classification, connection time classification) algorithm processes the license plate recognition results to perform character alignment operations to obtain the final license plate information. Among them, the CTC algorithm can combine repeated elements and remove space characters, which can be used to solve the input Alignment of features and output labels.
本实施例中,通过将深度双向递归神经网络与CTC算法相结合,可有效避免双行车牌信息的漏检或多检等识别错误的问题,从而进一步提高车牌识别结果的准确性。In this embodiment, by combining the deep bidirectional recurrent neural network with the CTC algorithm, problems such as missed detection or multi-detection of dual-vehicle license plate information can be effectively avoided, thereby further improving the accuracy of license plate recognition results.
进一步地,基于上述第一实施例,提出本发明双行车牌识别方法的第三实施例。Further, based on the above-mentioned first embodiment, a third embodiment of the method for recognizing dual-vehicle license plates of the present invention is proposed.
本实施例中,在步骤S20之前,还包括:In this embodiment, before step S20, it further includes:
步骤B,对所述车牌图像进行颜色统计,根据统计结果确定车牌号颜色;Step B, performing color statistics on the license plate image, and determining the color of the license plate number according to the statistical result;
在本实施例中,在获取到待识别双行车牌的车牌图像之后,对车牌图像进行颜色统计,根据统计结果确定车牌号颜色。由于车牌图像中主要包含2种颜色,一种为车牌背景色,一种为车牌号颜色。因此,在进行颜色统计后,统计结果中的最高统计值所对应的颜色即为车牌背景色,而统计结果中排名第二的统计值所对应的颜色即为车牌号颜色。In this embodiment, after acquiring the license plate image of the double-carriage license plate to be recognized, color statistics are performed on the license plate image, and the color of the license plate number is determined according to the statistical result. Because the license plate image mainly contains two colors, one is the background color of the license plate, and the other is the color of the license plate number. Therefore, after performing color statistics, the color corresponding to the highest statistical value in the statistical results is the background color of the license plate, and the color corresponding to the second statistical value in the statistical results is the color of the license plate number.
在进行颜色统计时,可通过预设图像读取函数提取该车牌图像各像素点的RGB(Red Green Blue,红绿蓝,也称作RGB色彩模式)值,然后基于该车牌图像各像素点的RGB值对车牌图像进行色彩统计。可选地,预设图像读取函数为imread()函数,在通过imread()函数读取车牌图像,可得到numpy(Python的一种开源的科学计算库)数组,即车牌图像各像素点对应的RGB值,然后遍历numpy数组,以对提取到的车牌图像的RGB值进行色彩统计,得到统计结果。When performing color statistics, the RGB (Red Green Blue, also known as RGB color mode) value of each pixel of the license plate image can be extracted through a preset image reading function, and then based on the value of each pixel of the license plate image RGB values perform color statistics on license plate images. Optionally, the preset image reading function is the imread() function. After reading the license plate image through the imread() function, a numpy (an open source scientific computing library of Python) array can be obtained, that is, each pixel of the license plate image corresponds to Then traverse the numpy array to perform color statistics on the RGB values of the extracted license plate image to obtain statistical results.
步骤C,根据所述车牌号颜色确定车牌号像素坐标,并根据所述车牌号像素坐标确定车牌号有效区域;Step C, determine the pixel coordinates of the license plate number according to the color of the license plate number, and determine the effective area of the license plate number according to the pixel coordinates of the license plate number;
然后,根据车牌号颜色确定车牌号像素坐标,并根据车牌号像素坐标确定车牌号有效区域。具体的,可获取车牌号颜色对应RGB值所对应的像素坐标,即为车牌号像素坐标,然后,基于车牌号像素坐标确定最外围的像素坐标构成车牌号有效区域。Then, the pixel coordinates of the license plate number are determined according to the color of the license plate number, and the valid area of the license plate number is determined according to the pixel coordinates of the license plate number. Specifically, the pixel coordinates corresponding to the RGB value of the license plate number color can be obtained, that is, the license plate number pixel coordinates, and then the outermost pixel coordinates are determined based on the license plate number pixel coordinates to form the license plate number valid area.
步骤D,根据所述车牌号有效区域对所述车牌图像进行裁剪,得到车牌号图像;Step D, cutting the license plate image according to the effective area of the license plate number to obtain a license plate number image;
进而根据车牌号有效区域对车牌图像进行裁剪,得到车牌号图像。Then, the license plate image is cropped according to the effective area of the license plate number to obtain the license plate number image.
此时,步骤S20包括:At this time, step S20 includes:
步骤A21,采用预设特征提取模型对所述车牌号图像进行特征提取,得到车牌特征矩阵。Step A21, using a preset feature extraction model to perform feature extraction on the license plate number image to obtain a license plate feature matrix.
在裁剪得到车牌号图像之后,采用预设特征提取模型对车牌号图像进行特征提取,得到车牌特征矩阵,进而执行后续步骤,具体的执行过程可参照上述实施例,此处不作赘述。After the license plate number image is obtained by cropping, a preset feature extraction model is used to extract the features of the license plate number image to obtain a license plate feature matrix, and then the subsequent steps are performed.
本实施例中,通过对车牌图像进行颜色统计,然后确定得到车牌号有效区域,以对车牌图像进行裁剪,得到车牌号图像,进而基于对该车牌号图像进行识别。通过上述方式,可缩小图像识别区域,从而可进一步提高识别效率。In this embodiment, by performing color statistics on the license plate image, and then determining the effective area of the license plate number, the license plate image is cropped to obtain the license plate number image, and then the identification is based on the license plate number image. In the above manner, the image recognition area can be reduced, so that the recognition efficiency can be further improved.
进一步地,基于上述第一实施例,提出本发明双行车牌识别方法的第四实施例。Further, based on the above-mentioned first embodiment, a fourth embodiment of the method for recognizing dual-vehicle license plates of the present invention is proposed.
本实施例中,在步骤S20之前,还包括:In this embodiment, before step S20, it further includes:
步骤E,对所述车牌图像进行图像校正处理,得到校正后的车牌图像;Step E, performing image correction processing on the license plate image to obtain a corrected license plate image;
在本实施例中,由于拍摄角度的问题,获取到的待识别双行车牌的车牌图像中的车牌号可能会存在倾斜或扭曲的现象,因此,为进一步提高车牌识别结果的准确率,可在获取到待识别双行车牌的车牌图像之后,对车牌图像进行图像校正处理,得到校正后的车牌图像。In this embodiment, due to the problem of the shooting angle, the license plate number in the obtained license plate image of the dual-vehicle license plate to be recognized may be inclined or distorted. Therefore, in order to further improve the accuracy of the license plate recognition result, the After acquiring the license plate image of the double-carriage license plate to be recognized, image correction processing is performed on the license plate image to obtain a corrected license plate image.
具体的,步骤E包括:Specifically, step E includes:
步骤E1,通过非线性指数对车牌图像进行非线性灰度变换,得到变换后的车牌图像;Step E1, performing nonlinear grayscale transformation on the license plate image through a nonlinear index to obtain a transformed license plate image;
步骤E2,通过预设边缘检测算法对所述变换后的车牌图像进行边缘检测,得到车牌字符外接框;Step E2, performing edge detection on the transformed license plate image by using a preset edge detection algorithm to obtain a character bounding frame of the license plate;
步骤E3,通过直线拟合建立所述车牌字符外接框对应的方程,并根据所述方程得到字符倾斜角度;Step E3, establishing an equation corresponding to the bounding box of the license plate character by straight line fitting, and obtaining the character inclination angle according to the equation;
步骤E4,基于所述字符倾斜角度对所述车牌图像进行旋转校正,得到校正后的车牌图像。Step E4, performing rotation correction on the license plate image based on the character inclination angle to obtain a corrected license plate image.
图像校正处理的过程如下:The process of image correction processing is as follows:
先通过非线性指数对车牌图像进行非线性灰度变换,得到变换后的车牌图像,通过灰度变换,可拉伸车牌图像的高灰度区,使得图像灰度对比更显著,便于后续的识别处理。然后,通过预设边缘检测算法对变换后的车牌图像进行边缘检测,得到车牌字符外接框。其中,预设边缘检测算法可以为sobel(索贝尔)算子或canny(坎尼)算法。Firstly, the license plate image is subjected to nonlinear grayscale transformation through the nonlinear index to obtain the transformed license plate image. Through grayscale transformation, the high grayscale area of the license plate image can be stretched, so that the grayscale contrast of the image is more significant, which is convenient for subsequent identification. deal with. Then, edge detection is performed on the transformed license plate image through a preset edge detection algorithm to obtain the bounding frame of the license plate characters. The preset edge detection algorithm may be a sobel operator or a canny algorithm.
在得到车牌字符外接框之后,通过直线拟合建立车牌字符外接框对应的方程,并根据方程得到字符倾斜角度。对于字符倾斜角度的计算过程如下:由于拍摄等原因车牌外框会有一定的弧度,车牌的边框所在的长直线可能会断裂成好几条斜率不同的直线段,因此,通过直线拟合建立该字符外接框对应的方程也包括多条。获取各直线方程y=ax+b,可基于倾斜角度的计算公式tanθ=-b/a,可得到多个角度值,取倾斜角度在-10~10°范围内的各角度值的平均值,得到字符倾斜角度。After obtaining the license plate character bounding box, the equation corresponding to the license plate character bounding box is established by straight line fitting, and the character inclination angle is obtained according to the equation. The calculation process of the character inclination angle is as follows: the outer frame of the license plate will have a certain radian due to shooting and other reasons, and the long straight line where the frame of the license plate is located may be broken into several straight line segments with different slopes. Therefore, the character is established by straight line fitting. The equation corresponding to the bounding box also includes multiple items. To obtain the equations of each straight line y=ax+b, based on the calculation formula of the inclination angle tanθ=-b/a, multiple angle values can be obtained, and the average value of each angle value of the inclination angle in the range of -10 to 10° can be obtained, Get the character inclination angle.
最后,基于字符倾斜角度对车牌图像进行旋转校正,得到校正后的车牌图像。Finally, the license plate image is rotated and corrected based on the character inclination angle to obtain the corrected license plate image.
此时,步骤S20包括:At this time, step S20 includes:
步骤A22,采用预设特征提取模型对所述校正后的车牌图像进行特征提取,得到车牌特征矩阵。Step A22, using a preset feature extraction model to perform feature extraction on the corrected license plate image to obtain a license plate feature matrix.
在对待识别双行车牌的车牌图像进行校正之后,采用预设特征提取模型对校正后的车牌图像进行特征提取,得到车牌特征矩阵,进而执行后续步骤,具体的执行过程可参照上述实施例,此处不作赘述。After the license plate image of the double-pass license plate to be recognized is corrected, the preset feature extraction model is used to extract the feature of the corrected license plate image, and the license plate feature matrix is obtained, and then the subsequent steps are executed. No further elaboration here.
本实施例中,通过对车牌图像进行图像校正处理,进而基于对校正后的车牌图像进行识别,可进一步提高双行车牌识别结果的准确性。In this embodiment, by performing image correction processing on the license plate image, and then recognizing the corrected license plate image, the accuracy of the double-carriage license plate recognition result can be further improved.
本发明还提供一种双行车牌识别装置。The invention also provides a double-drive license plate recognition device.
参照图3,图3为本发明双行车牌识别装置第一实施例的功能模块示意图。Referring to FIG. 3 , FIG. 3 is a schematic diagram of the functional modules of the first embodiment of the dual-vehicle license plate recognition device of the present invention.
在本实施例中,所述双行车牌识别装置包括:In this embodiment, the dual-vehicle license plate recognition device includes:
图像获取模块10,用于获取待识别双行车牌的车牌图像;The
特征提取模块20,用于采用预设特征提取模型对所述车牌图像进行特征提取,得到车牌特征矩阵;A
特征重组模块30,用于对所述车牌特征矩阵进行特征重组,得到目标车牌特征;The
车牌识别模块40,用于将所述目标车牌特征输入至预设深度双向递归神经网络中,得到所述待识别双行车牌的车牌识别结果。The license
其中,上述双行车牌识别装置的各虚拟功能模块存储于图1所示双行车牌识别设备的存储器1005中,用于实现双行车牌识别程序的所有功能;各模块被处理器1001执行时,可实现双行车牌的识别功能。Wherein, each virtual function module of the above-mentioned dual-vehicle license plate recognition device is stored in the
进一步的,所述预设特征提取模型包括输入层、卷积层、池化层和归一化层;其中,Further, the preset feature extraction model includes an input layer, a convolution layer, a pooling layer and a normalization layer; wherein,
所述输入层用于接收所述待识别双行车牌的车牌图像;The input layer is used to receive the license plate image of the to-be-recognized dual-vehicle license plate;
所述卷积层用于根据卷积核提取所述车牌图像的图像特征矩阵;The convolution layer is used to extract the image feature matrix of the license plate image according to the convolution kernel;
所述池化层用于对所述卷积层的输出进行池化处理;The pooling layer is used for pooling the output of the convolutional layer;
所述归一化层用于对所述卷积层的输出进行归一化处理。The normalization layer is used for normalizing the output of the convolution layer.
进一步地,所述特征重组模块30包括:Further, the
矩阵拆分单元,用于按所述车牌特征矩阵的高度对所述车牌特征矩阵进行拆分,得到第一特征矩阵和第二特征矩阵;a matrix splitting unit, configured to split the license plate feature matrix according to the height of the license plate feature matrix to obtain a first feature matrix and a second feature matrix;
组合拼接单元,用于将所述第一特征矩阵与所述第二特征矩阵进行组合拼接,得到目标车牌特征。The combined splicing unit is used for combining and splicing the first feature matrix and the second feature matrix to obtain the target license plate feature.
进一步地,所述双行车牌识别装置还包括:Further, the dual-vehicle license plate recognition device also includes:
结果处理模块,用于通过联接时间分类CTC算法对所述车牌识别结果进行处理,得到所述待识别双行车牌的的车牌信息。The result processing module is used for processing the license plate recognition result through the connection time classification CTC algorithm to obtain the license plate information of the dual-carriage license plate to be recognized.
进一步地,所述双行车牌识别装置还包括:Further, the dual-vehicle license plate recognition device also includes:
颜色统计模块,用于对所述车牌图像进行颜色统计,根据统计结果确定车牌号颜色;The color statistics module is used to perform color statistics on the license plate image, and determine the color of the license plate number according to the statistical results;
区域确定模块,用于根据所述车牌号颜色确定车牌号像素坐标,并根据所述车牌号像素坐标确定车牌号有效区域;an area determination module, configured to determine the pixel coordinates of the license plate number according to the color of the license plate number, and determine the effective area of the license plate number according to the pixel coordinates of the license plate number;
图像裁剪模块,用于根据所述车牌号有效区域对所述车牌图像进行裁剪,得到车牌号图像;an image cropping module, configured to crop the license plate image according to the effective area of the license plate number to obtain a license plate number image;
所述特征提取模块20还用于:The
采用预设特征提取模型对所述车牌号图像进行特征提取,得到车牌特征矩阵。A preset feature extraction model is used to perform feature extraction on the license plate number image to obtain a license plate feature matrix.
进一步地,所述双行车牌识别装置还包括:Further, the dual-vehicle license plate recognition device also includes:
图像校正模块,用于对所述车牌图像进行图像校正处理,得到校正后的车牌图像;an image correction module for performing image correction processing on the license plate image to obtain a corrected license plate image;
所述特征提取模块20还用于:The
采用预设特征提取模型对所述校正后的车牌图像进行特征提取,得到车牌特征矩阵。A preset feature extraction model is used to perform feature extraction on the corrected license plate image to obtain a license plate feature matrix.
进一步地,所述图像校正模块包括:Further, the image correction module includes:
灰度变换单元,用于通过非线性指数对车牌图像进行非线性灰度变换,得到变换后的车牌图像;The grayscale transformation unit is used to perform nonlinear grayscale transformation on the license plate image through the nonlinear index to obtain the transformed license plate image;
边缘检测单元,用于通过预设边缘检测算法对所述变换后的车牌图像进行边缘检测,得到车牌字符外接框;an edge detection unit, configured to perform edge detection on the transformed license plate image by using a preset edge detection algorithm to obtain a bounding frame of the license plate characters;
角度获取单元,用于通过直线拟合建立所述车牌字符外接框对应的方程,并根据所述方程得到字符倾斜角度;an angle acquisition unit, configured to establish an equation corresponding to the bounding box of the license plate character by straight line fitting, and obtain the character inclination angle according to the equation;
图像校正单元,用于基于所述字符倾斜角度对所述车牌图像进行旋转校正,得到校正后的车牌图像。An image correction unit, configured to perform rotation correction on the license plate image based on the character inclination angle to obtain a corrected license plate image.
其中,上述双行车牌识别装置中各个模块的功能实现与上述双行车牌识别方法实施例中各步骤相对应,其功能和实现过程在此处不再一一赘述。The function implementation of each module in the above-mentioned dual-vehicle license plate recognition device corresponds to each step in the above-mentioned embodiment of the dual-vehicle license plate recognition method, and the functions and implementation processes thereof will not be repeated here.
本发明还提供一种计算机可读存储介质,该计算机可读存储介质上存储有双行车牌识别程序,所述双行车牌识别程序被处理器执行时实现如以上任一项实施例所述的双行车牌识别方法的步骤。The present invention further provides a computer-readable storage medium, where a dual-vehicle license plate recognition program is stored on the computer-readable storage medium, and when the dual-vehicle license plate recognition program is executed by a processor, any of the above embodiments can be implemented. The steps of the dual-vehicle license plate recognition method.
本发明计算机可读存储介质的具体实施例与上述双行车牌识别方法各实施例基本相同,在此不作赘述。The specific embodiments of the computer-readable storage medium of the present invention are basically the same as those of the above-mentioned embodiments of the method for recognizing two-way license plates, and will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or system comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or system. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or system that includes the element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages or disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on such understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM) as described above. , magnetic disk, optical disk), including several instructions to make a device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present invention, or directly or indirectly applied in other related technical fields , are similarly included in the scope of patent protection of the present invention.
Claims (10)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010371388.1A CN111582272A (en) | 2020-04-30 | 2020-04-30 | Double-row license plate recognition method, device and equipment and computer readable storage medium |
PCT/CN2020/135310 WO2021218164A1 (en) | 2020-04-30 | 2020-12-10 | Double-line license plate recognition method, apparatus and device, and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010371388.1A CN111582272A (en) | 2020-04-30 | 2020-04-30 | Double-row license plate recognition method, device and equipment and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111582272A true CN111582272A (en) | 2020-08-25 |
Family
ID=72120754
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010371388.1A Pending CN111582272A (en) | 2020-04-30 | 2020-04-30 | Double-row license plate recognition method, device and equipment and computer readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111582272A (en) |
WO (1) | WO2021218164A1 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112686252A (en) * | 2020-12-28 | 2021-04-20 | 中国联合网络通信集团有限公司 | License plate detection method and device |
WO2021218164A1 (en) * | 2020-04-30 | 2021-11-04 | 平安科技(深圳)有限公司 | Double-line license plate recognition method, apparatus and device, and computer-readable storage medium |
CN113780113A (en) * | 2021-08-25 | 2021-12-10 | 廊坊中油朗威工程项目管理有限公司 | Pipeline violation behavior identification method |
CN116597437A (en) * | 2023-07-18 | 2023-08-15 | 昆明理工大学 | End-to-end Laos license plate identification method and device integrating double-layer attention network |
WO2024131630A1 (en) * | 2022-12-21 | 2024-06-27 | 中国电信股份有限公司 | License plate recognition method and apparatus, electronic device, and storage medium |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114463611B (en) * | 2021-12-18 | 2025-05-13 | 北京工业大学 | A robust Chinese license plate detection and correction method in uncontrolled environment |
CN114529786B (en) * | 2022-02-24 | 2025-01-03 | 科大讯飞股份有限公司 | License plate recognition method, related equipment and readable storage medium |
CN114821019B (en) * | 2022-03-29 | 2025-02-25 | 烽火通信科技股份有限公司 | License plate number recognition method, device, equipment and readable storage medium |
CN115116030A (en) * | 2022-06-13 | 2022-09-27 | 中国第一汽车股份有限公司 | Traffic signboard recognition method and device, storage medium and electronic device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101303803A (en) * | 2008-06-11 | 2008-11-12 | 北京中星微电子有限公司 | Method and system for discriminating license plate |
CN103279736A (en) * | 2013-04-27 | 2013-09-04 | 电子科技大学 | License plate detection method based on multi-information neighborhood voting |
CN105976502A (en) * | 2016-04-26 | 2016-09-28 | 江苏茴香豆网络科技有限公司 | Acceptance bill serial number identification method and acceptance bill serial number identification device |
CN110414451A (en) * | 2019-07-31 | 2019-11-05 | 深圳市捷顺科技实业股份有限公司 | It is a kind of based on end-to-end licence plate recognition method, device, equipment and storage medium |
CN110889323A (en) * | 2019-10-10 | 2020-03-17 | 平安科技(深圳)有限公司 | General license plate recognition method, device, computer equipment and storage medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103413147B (en) * | 2013-08-28 | 2017-07-07 | 庄浩洋 | A kind of licence plate recognition method and system |
CN108229474B (en) * | 2017-12-29 | 2019-10-01 | 北京旷视科技有限公司 | Licence plate recognition method, device and electronic equipment |
US11030466B2 (en) * | 2018-02-11 | 2021-06-08 | Nortek Security & Control Llc | License plate detection and recognition system |
CN109034019B (en) * | 2018-07-12 | 2021-08-17 | 浙江工业大学 | A method for character segmentation of yellow double-line license plate based on line dividing line |
CN110070085B (en) * | 2019-04-30 | 2021-11-02 | 北京百度网讯科技有限公司 | License plate recognition method and device |
CN110942071A (en) * | 2019-12-09 | 2020-03-31 | 上海眼控科技股份有限公司 | License plate recognition method based on license plate classification and LSTM |
CN111582272A (en) * | 2020-04-30 | 2020-08-25 | 平安科技(深圳)有限公司 | Double-row license plate recognition method, device and equipment and computer readable storage medium |
-
2020
- 2020-04-30 CN CN202010371388.1A patent/CN111582272A/en active Pending
- 2020-12-10 WO PCT/CN2020/135310 patent/WO2021218164A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101303803A (en) * | 2008-06-11 | 2008-11-12 | 北京中星微电子有限公司 | Method and system for discriminating license plate |
CN103279736A (en) * | 2013-04-27 | 2013-09-04 | 电子科技大学 | License plate detection method based on multi-information neighborhood voting |
CN105976502A (en) * | 2016-04-26 | 2016-09-28 | 江苏茴香豆网络科技有限公司 | Acceptance bill serial number identification method and acceptance bill serial number identification device |
CN110414451A (en) * | 2019-07-31 | 2019-11-05 | 深圳市捷顺科技实业股份有限公司 | It is a kind of based on end-to-end licence plate recognition method, device, equipment and storage medium |
CN110889323A (en) * | 2019-10-10 | 2020-03-17 | 平安科技(深圳)有限公司 | General license plate recognition method, device, computer equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
刘源根等: "不定长车牌字符分割算法", 《现代机械》, no. 3, 25 June 2006 (2006-06-25), pages 17 - 18 * |
栾悉道等: "《多媒体情报处理技术》", 31 May 2016, 国防工业出版社, pages: 59 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021218164A1 (en) * | 2020-04-30 | 2021-11-04 | 平安科技(深圳)有限公司 | Double-line license plate recognition method, apparatus and device, and computer-readable storage medium |
CN112686252A (en) * | 2020-12-28 | 2021-04-20 | 中国联合网络通信集团有限公司 | License plate detection method and device |
CN113780113A (en) * | 2021-08-25 | 2021-12-10 | 廊坊中油朗威工程项目管理有限公司 | Pipeline violation behavior identification method |
WO2024131630A1 (en) * | 2022-12-21 | 2024-06-27 | 中国电信股份有限公司 | License plate recognition method and apparatus, electronic device, and storage medium |
CN116597437A (en) * | 2023-07-18 | 2023-08-15 | 昆明理工大学 | End-to-end Laos license plate identification method and device integrating double-layer attention network |
CN116597437B (en) * | 2023-07-18 | 2023-10-03 | 昆明理工大学 | End-to-end Laos vehicle license plate recognition method and device integrating double-layer attention network |
Also Published As
Publication number | Publication date |
---|---|
WO2021218164A1 (en) | 2021-11-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111582272A (en) | Double-row license plate recognition method, device and equipment and computer readable storage medium | |
US11734938B2 (en) | Methods for mobile image capture of vehicle identification numbers in a non-document | |
CN107194398B (en) | Vehicle damages recognition methods and the system at position | |
WO2019205376A1 (en) | Vehicle damage determination method, server, and storage medium | |
US10332245B1 (en) | Systems and methods for quality assurance of image recognition model | |
US9082038B2 (en) | Dram c adjustment of automatic license plate recognition processing based on vehicle class information | |
US20230154210A1 (en) | Method for recognizing license plate characters, electronic device and storage medium | |
US20210124967A1 (en) | Method and apparatus for sample labeling, and method and apparatus for identifying damage classification | |
US20210166015A1 (en) | Certificate image extraction method and terminal device | |
CN110675940A (en) | Pathological image labeling method and device, computer equipment and storage medium | |
CN109116129B (en) | Terminal detection method, detection device, system and storage medium | |
CN112651280B (en) | Information prompting method and device | |
CN112102402A (en) | Flash lamp light spot position identification method and device, electronic equipment and storage medium | |
CN111709377B (en) | Feature extraction method, target re-identification method and device and electronic equipment | |
CN112668640A (en) | Text image quality evaluation method, device, equipment and medium | |
CN111178357B (en) | License plate recognition method, system, device and storage medium | |
Papakis et al. | Convolutional neural network-based in-vehicle occupant detection and classification method using second strategic highway research program cabin images | |
CN114332883A (en) | Invoice information identification method and device, computer equipment and storage medium | |
WO2022006829A1 (en) | Bill image recognition method and system, electronic device, and storage medium | |
CN113095311B (en) | License plate number recognition method, device and storage medium | |
CN111161542A (en) | Vehicle identification method and device | |
CN114004965B (en) | Vehicle detection method, terminal and computer-readable storage medium | |
CN116597403A (en) | Target object positioning method, device, computer equipment and storage medium | |
CN112308062B (en) | Medical image access number identification method in complex background image | |
CN114529786B (en) | License plate recognition method, related equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |