CN109447117A - The double-deck licence plate recognition method, device, computer equipment and storage medium - Google Patents

The double-deck licence plate recognition method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109447117A
CN109447117A CN201811119253.5A CN201811119253A CN109447117A CN 109447117 A CN109447117 A CN 109447117A CN 201811119253 A CN201811119253 A CN 201811119253A CN 109447117 A CN109447117 A CN 109447117A
Authority
CN
China
Prior art keywords
image
license plate
target
character
obtains
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.)
Granted
Application number
CN201811119253.5A
Other languages
Chinese (zh)
Other versions
CN109447117B (en
Inventor
雷晨雨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811119253.5A priority Critical patent/CN109447117B/en
Publication of CN109447117A publication Critical patent/CN109447117A/en
Application granted granted Critical
Publication of CN109447117B publication Critical patent/CN109447117B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation 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/267Segmentation 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/63Scene text, e.g. street names
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/625License plates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Abstract

The invention discloses a kind of double-deck licence plate recognition methods, device, computer equipment and storage medium, the described method includes: by obtaining initial license plate image, and initial license plate image is pre-processed, obtain target license plate image, and the license plate number of plies is judged using support vector machines, it ensure that and the double-deck license plate is accurately identified, if the license plate number of plies is bilayer, then each layer is slided using sliding window respectively, so that it includes the sliding window image that partly overlaps that each layer of license plate image, which is divided into multiple, character in license plate number occurs repeatedly, avoid relying on the unrecognized situation of partial character in license plate number caused by the Character segmentation template of artificial division, improve the versatility of the double-deck Car license recognition, simultaneously, obtained sliding window image is input in convolutional neural networks and is identified, it is quickly obtained more A corresponding recognition result, improves the efficiency of the double-deck Car license recognition.

Description

The double-deck licence plate recognition method, device, computer equipment and storage medium
Technical field
The present invention relates to technical field of image processing more particularly to a kind of double-deck licence plate recognition method, device, computer to set Standby and storage medium.
Background technique
With the development of the social economy, more and more automobiles appear in road traffic or parking facility, it gives people Life bring many conveniences, but the management of automobile also becomes to become increasingly complex.Such as vehicle toll and management, the magnitude of traffic flow Detection, parking lot fee collection management, monitoring vehicle breaking regulation, the particular problems such as fake license vehicle identification.
For these problems, currently employed main method is to be managed by identification license plate to vehicle, current logical It include single layer license plate and the double-deck license plate with license plate, currently when being identified to these license plates, the Car license recognition skill that mainly uses Art is split to license plate image, and then carry out Car license recognition to the image after segmentation by direct artificial delimitation ratio, this Kind method recognition accuracy is low, and can not judge the number of plies of license plate, when the license plate number of plies is double-deck, can generate unrecognized feelings Condition does not have robustness and versatility.
Summary of the invention
The embodiment of the present invention provides a kind of double-deck licence plate recognition method, device, computer equipment and storage medium, to solve Problem currently low to the double-deck license plate recognition accuracy and that versatility is weak.
A kind of bilayer licence plate recognition method, comprising:
Obtain initial license plate image;
The initial license plate image is pre-processed, the target license plate image that size is 2a × 2b pixel is obtained, In, a, b are positive integer;
Number of plies detection is carried out to the target license plate image using support vector machines, obtains the target number of plies, wherein the mesh Marking the number of plies includes single layer and bilayer;
It at two sizes is 2a × b picture by the target license plate image cropping if the target number of plies is bilayer The intermediate images of element, and using the intermediate images of 2a × b pixel of lower layer as lower image, by the 2a × b pixel on upper layer Intermediate images cut, the image of a × b pixel size of central area is obtained, as upper layer images;
Use default size for the sliding window of c × b pixel, using 1 pixel as step-length, respectively in the upper layer images It neutralizes in the lower image, carries out slide from left to right, and obtain when sliding every time within the scope of the sliding window Target license plate image, as a sliding window image, wherein c < a and c are positive integer;
In the upper layer images, after sliding a-c times, the slide on upper layer is terminated, a-c sliding window figure is obtained Picture after sliding 2a-c times in the lower image, terminates the slide in the lower image, obtains 2a-c sliding window Mouth image, is obtained 3a-2c sliding window image;
The 3a-2c sliding window images are input in convolutional neural networks and are identified, 3a-2c identification is obtained As a result, wherein each recognition result includes several characters;
All characters in the 3a-2c recognition results are formed into character set, according to default partitioning scheme to the word Symbol collection is split, and obtains target character from every obtained sub- character set, and determine target carriage according to the target character Trade mark code.
A kind of bilayer license plate recognition device, comprising:
Module is obtained, for obtaining initial license plate image;
Preprocessing module, for pre-processing to the initial license plate image, obtaining size is 2a × 2b pixel Target license plate image, wherein a, b are positive integer;
Judgment module obtains destination layer for carrying out number of plies detection to the target license plate image using support vector machines Number, wherein the target number of plies includes single layer and bilayer;
Hierarchical block, if being bilayer for the target number of plies, by the target license plate image cropping at two sizes It is the intermediate images of 2a × b pixel, and using the intermediate images of 2a × b pixel of lower layer as lower image, by upper layer The intermediate images of 2a × b pixel cut, the image of a × b pixel size of central area is obtained, as upper layer figure Picture;
Sliding block, for using default size for the sliding window of c × b pixel, using 1 pixel as step-length, respectively In the upper layer images and in the lower image, slide is carried out from left to right, and obtains cunning when sliding every time Target license plate image in dynamic window ranges, as a sliding window image, wherein c < a and c is positive integer;
Module is terminated, for after sliding a-c times, the slide on upper layer being terminated, obtaining a- in the upper layer images C sliding window image after sliding 2a-c times in the lower image, terminates the slide in the lower image, obtains To 2a-c sliding window image, 3a-2c sliding window image is obtained;
Identification module is identified for the 3a-2c sliding window images to be input in convolutional neural networks, is obtained To 3a-2c recognition result, wherein each recognition result includes several characters;
Divide module, for all characters in the 3a-2c recognition results to be formed character set, according to default segmentation Mode is split the character set, obtains target character from every obtained sub- character set, and according to the target word It accords with and determines target license plate number.
A kind of computer equipment, including memory, processor and storage are in the memory and can be in the processing The computer program run on device, the processor realize the above-mentioned double-deck licence plate recognition method when executing the computer program Step.
A kind of computer readable storage medium, the computer-readable recording medium storage have computer program, the meter Calculation machine program realizes the step of above-mentioned double-deck licence plate recognition method when being executed by processor.
Above-mentioned bilayer licence plate recognition method, device, computer equipment and storage medium, on the one hand, by obtaining initial vehicle Board image, and initial license plate image is pre-processed, target license plate image is obtained, and using support vector machines to the license plate number of plies Judged, ensure that and the double-deck license plate is accurately identified, if the license plate number of plies is bilayer, uses sliding window to each layer respectively Mouthful slided so that each layer of license plate image be divided into it is multiple comprising the sliding window image that partly overlaps, in license plate number Character occurs repeatedly, and avoiding relying on the partial character in license plate number caused by the Character segmentation template of artificial division can not know Other situation improves the versatility of the double-deck Car license recognition;On the other hand, obtained sliding window image is input to convolution mind It is identified in network, is quickly obtained multiple corresponding recognition results, improves the efficiency of the double-deck Car license recognition.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is the application environment schematic diagram of the double-deck licence plate recognition method provided in an embodiment of the present invention;
Fig. 2 is the implementation flow chart of the double-deck licence plate recognition method provided in an embodiment of the present invention;
Fig. 3 is the implementation flow chart of step S30 in the double-deck licence plate recognition method provided in an embodiment of the present invention;
Fig. 4 is the implementation flow chart of step S20 in the double-deck licence plate recognition method provided in an embodiment of the present invention;
Fig. 5 is the implementation flow chart of step S21 in the double-deck licence plate recognition method provided in an embodiment of the present invention;
Fig. 6 is the implementation flow chart of step S80 in the double-deck licence plate recognition method provided in an embodiment of the present invention;
Fig. 7 is the schematic diagram of the double-deck license plate recognition device provided in an embodiment of the present invention;
Fig. 8 is the schematic diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
Referring to Fig. 1, Fig. 1 shows the application environment of the double-deck licence plate recognition method provided in an embodiment of the present invention.The bilayer Licence plate recognition method is applied to carry out in Car license recognition scene in the license plate for the vehicle taken.The identification scene includes service End and client, wherein be attached between server-side and client by network, client will take license plate image transmission To server-side, server-side receives the license plate image that client is sent and is identified, client specifically can be, but not limited to be super Fast camera, the monitoring of day net, electronic police, various personal computers, laptop, smart phone, tablet computer and portable Formula wearable device, server-side can specifically be realized with the server cluster that independent server or multiple servers form.
Referring to Fig. 2, being applied in this way Fig. 2 shows a kind of double-deck licence plate recognition method provided in an embodiment of the present invention It is illustrated for server-side in Fig. 1, details are as follows:
S10: initial license plate image is obtained.
Specifically, after client obtains initial license plate image, initial license plate image is sent to by the network transmission protocol Server-side, server-side receive the initial license plate image by the network transmission protocol.
Wherein, client specifically can be the monitoring with shooting function such as hypervelocity camera, the monitoring of day net, electronic police Equipment, directly shooting obtain initial license plate image, are also possible to various personal computers, laptop, smart phone or flat The intelligent terminals such as plate computer, the memory space with storing initial license plate image, and network interaction is carried out with server-side Function.
Wherein, the network transmission protocol includes but is not limited to: Internet Control Message agreement (Internet Control Message Protocol, ICMP), address resolution protocol (ARP Address Resolution Protocol, ARP) and text Part transport protocol (File Transfer Protocol, FTP) etc..
S20: pre-processing initial license plate image, obtains the target license plate image that size is 2a × 2b pixel, In, a, b are positive integer.
Specifically, due to the angle of shooting, distance and automobile the factors such as run at high speed influence, get just Beginning license plate image is of low quality, and directly progress recognition correct rate is lower, it is then desired to first be located initial license plate image in advance Reason influences to reduce these factor brings, improves the accuracy rate of subsequent identification, pre-process to initial license plate image Afterwards, the target license plate image that size is 2a × 2b pixel is obtained.
Wherein, pretreatment includes but is not limited to: image cropping, normalization and slant correction etc..
Wherein, a and b is preset numerical value, and basic unit is the width of 1 pixel, using 2a as horizontal direction side length, i.e., Using the width of 2a pixel as horizontal direction side length, using 2b as vertical direction side length, i.e., using the width of 2b pixel as perpendicular Histogram is to side length, and a and b are positive integer, and specific value, which can according to need, to be configured, and is not specifically limited herein.
Preferably, in embodiments of the present invention, the value of a takes the value of 70, b to take 28, that is, finally obtains 140 × 56 target carriage Board image.
S30: number of plies detection is carried out to target license plate image using support vector machines, obtains the target number of plies, wherein destination layer Number includes single layer and bilayer.
Specifically, by using preparatory trained support vector machines, the number of plies of target license plate image is detected, from And the number of plies of the target license plate image is obtained, as the target number of plies.
Wherein, support vector machines (Support Vector Machine, SVM) is a kind of classifier, is belonged to and engineering The related supervised learning model of algorithm is practised, a support vector machines constructs a hyperplane or infinite dimensional space, can be used for Classification returns, and in embodiments of the present invention, the layer to target license plate image may be implemented in preparatory trained support vector machines Number is identified.
S40: at two sizes being 2a × b pixel by target license plate image cropping if the target number of plies is bilayer Intermediate images, and using the intermediate images of 2a × b pixel of lower layer as lower image, by facing for the 2a × b pixel on upper layer When image cut, the image of a × b pixel size of central area is obtained, as upper layer images.
Specifically, if the target number of plies obtained in step S30 is bilayer, by target license plate image cropping at upper and lower two Size is the intermediate images of 2a × b pixel, and using the intermediate images of 2a × b pixel of lower layer as lower image, right The intermediate images of the 2a × b pixel on upper layer are cut, and the image of a × b size of central area are obtained, as upper layer figure Picture.
For example, in a specific embodiment, the value that the value of a is 70, b is 28, i.e., the size of target license plate image is 140 × 56 pixels, when the target number of plies is double-deck, by target license plate image cropping at the interim of upper and lower two 140 × 28 pixels Image, and using following intermediate images as lower image, cutting out upper layer images central area size is 70 × 28 pixels Image, as upper layer images.
S50: use default size for the sliding window of c × b pixel, using 1 pixel as step-length, respectively in upper layer images It neutralizes in lower image, target license plate when carrying out slide from left to right, and obtaining sliding every time within the scope of sliding window Image, as a sliding window image, wherein c < a and c are positive integer.
Specifically, by presetting the sliding window that size is c × b pixel, using 1 pixel as step-length, in upper layer images Slide is carried out on upper and lower tomographic image from left to right, is slided every time, the target license plate image within the scope of sliding window is obtained, As a sliding window image, so that multiple sliding windows have the image section of phase negative lap, favorably after multiple sliding The preferred of target character is carried out in subsequent.
Wherein, the width b of sliding window and target license plate image is of same size, length c can according to the actual situation into Row setting, is not particularly limited herein.
Preferably, the numerical value of c is set as 28 in the embodiment of the present invention, i.e., is made using the square of 28 × 28 pixels It is slided for sliding window.
It is worth noting that this sliding window also can be used if the target number of plies detected in step S30 is single layer Mode carries out window sliding to target license plate image, obtains multiple sliding window images, and then know to sliding window image Not, or using general licence plate recognition method it is identified, is not specifically limited herein.
S60: in upper layer images, after sliding a-c times, the slide on upper layer is terminated, a-c sliding window figure is obtained Picture after sliding 2a-c times in lower image, terminates the slide in lower image, obtains 2a-c sliding window image, 3a-2c sliding window image is obtained.
Specifically, the length of upper layer images is a, and the length of sliding window is b, sliding step 1, sliding by a-c times Dynamic, the right end of sliding window is Chong Die with the right end of target license plate image, i.e. the right end of the mobile upper layer images of sliding window, at this time One is obtained a-c sliding window image, and the length of lower image is 2a, and the length of sliding window is b, sliding step 1, It is slided by 2a-c times, the right end of sliding window and the right end of lower image are Chong Die, i.e., sliding window is moved to lower image At this time one 2a-c sliding window image is obtained in right end, and one is obtained 3a-2c sliding window image.
S70: 3a-2c sliding window image being input in convolutional neural networks and is identified, obtains 3a-2c identification As a result, wherein each recognition result includes several characters.
Specifically, 3a-2c sliding window image obtained in step S60 is input to and is trained as input picture Convolutional neural networks in identified, in the full articulamentum of convolutional neural networks, be preset with 71 classifiers, each classifier A corresponding preset characters, totally 71 preset characters, are respectively as follows: preset 35 Chinese characters, preset 26 capitalization English letters With preset 10 Arabic numerals, sliding window image is input to full articulamentum after convolution algorithm, uses preset 71 A classifier carries out Classification and Identification, obtains 3a-2c recognition result.
It is worth noting that each recognition result is the character or multiple characters in this 71 preset characters.
Wherein, preset 35 Chinese characters include: capital, saliva, Ji, Shanxi, illiteracy, the Liao Dynasty, Ji, black, Shanghai, Soviet Union, Zhejiang, Anhui, Fujian, Jiangxi, Shandong, Henan, Hubei Province, Hunan, Guangdong, osmanthus, fine jade, Chongqing, river, Guizhou Province, Yunnan, hiding, Shan, sweet, green, hiding, peaceful, new, platform, port, Australia.
Wherein, preset 26 capitalization English letters include: A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S、T、U、V、W、X、Y、Z。
Wherein, preset 10 Arabic numerals include: 0,1,2,3,4,5,6,7,8,9.
Wherein, convolutional Neural net (Convolutional Neural Network, CNN) is a kind of feedforward neural network, Its artificial neuron can respond the surrounding cells in a part of coverage area, can rapidly and efficiently carry out image procossing.
S80: forming character set for the character in 3a-2c recognition result, carries out according to default partitioning scheme to character set Segmentation obtains target character from every obtained sub- character set, and determines target license plate number according to target character.
Specifically, the character in 3a-2c recognition result is formed character set, and according to default partitioning scheme to character Collection is split, and obtains at least two sub- character set, and then preferably goes out a target character from every sub- character set, pass through by Each target character is combined, and obtains target license plate number.
Wherein, default partitioning scheme can be the sub- character set quantity divided as needed, carry out average mark to character set It cuts, is also possible to be split sub- character set according to preset range or default cut-point, can also carry out according to the actual situation Setting, is not especially limited herein.
It is worth noting that since license plate number is generally 7 characters, the embodiment of the present invention as a preferred method, The character set that 3a-2c recognition result forms is divided into 7 sub- character set according to default partitioning scheme.
In the present embodiment, by obtaining initial license plate image, and initial license plate image is pre-processed, obtain target carriage Board image, and the license plate number of plies is judged using support vector machines, it ensure that and the double-deck license plate is accurately identified, in license plate layer When number is double-deck, each layer is slided using sliding window respectively, so that each layer of license plate image is divided into and multiple includes Partly overlap sliding window image, and the character in license plate number occurs repeatedly, avoids relying on the Character segmentation mould of artificial division The unrecognized situation of partial character in license plate number caused by plate, improves the versatility of the double-deck Car license recognition, meanwhile, it will Obtained sliding window image, which is input in convolutional neural networks, to be identified, multiple corresponding recognition results are quickly obtained, Improve the efficiency of the double-deck Car license recognition.
On the basis of the corresponding embodiment of Fig. 2, below by a specific embodiment come to being mentioned in step S30 And use support vector machines number of plies detection is carried out to target license plate image, obtain the target number of plies concrete methods of realizing carry out it is detailed It describes in detail bright.
Referring to Fig. 3, Fig. 3 shows the specific implementation flow of step S30 provided in an embodiment of the present invention, details are as follows:
S31: the image vector feature of target license plate image is extracted.
Specifically, the image vector feature of target license plate image, the input feature vector as support vector machines are extracted.
Wherein, image vector feature include but is not limited to color vector feature, texture feature, shape vector feature and Spatial relationship vector characteristics, it is preferable that the image vector feature that the embodiment of the present invention is extracted is spatial relationship vector characteristics, is passed through Spatial relationship vector characteristics are input in support vector machines, judge the target number of plies of the target license plate image.
Wherein, extracting mode includes but is not limited to: principal component analysis (Principal Component Analysis, PCA) feature extraction algorithm, the feature extraction based on convolutional neural networks and local binary patterns (Local Binary Pattern, LBP) feature extraction algorithm etc..Specific extracting mode can be configured according to actual needs, herein with no restriction.
S32: the functional value of the classification function of characteristics of image is calculated using following formula:
F (x)=wTx+b
Wherein, f (x) is classification function, and w is the weight vector of the hyperplane of support vector machines, wTFor the weight of hyperplane The transposition of vector, x are image vector feature, and b is preset bias.
Specifically, by the image vector feature that will be extracted in step S31, it is input to preparatory trained support vector machines In calculated, obtain the function of the corresponding classification function of image vector feature using above-mentioned formula in the support vector machines Value, wherein w is the weight vector of the hyperplane of the support vector machines, wTFor the transposition of the weight vector of hyperplane, b is the branch Hold the bias of vector machine.
Wherein, support vector machines calculates the weight vector and bias of hyperplane by kernel function, uses different core letters Number, the weight vector of the hyperplane being calculated and bias are different, and recognition accuracy is also different, common kernel function include but It is not limited to: linear kernel function, Polynomial kernel function, Gauss (Radial Basis Function, RBF) kernel function and sigmoid Kernel function etc..
Preferably, the embodiment of the present invention use the support vector machines based on gaussian kernel function, no matter large sample or sample This, the support vector machines based on gaussian kernel function has relatively high recognition accuracy, and its core relative to other classifications Function parameter is less, and compatibility is stronger.
S33: if functional value is greater than or equal to 0, it is determined that the target number of plies is bilayer.
Specifically, if the functional value being calculated in step S32 is greater than or equal to 0, it is determined that the target license plate image The target number of plies is bilayer.
It should be noted that if the functional value being calculated in step S32 is less than 0, it is determined that the target license plate image The target number of plies is that single layer for the target license plate image of single layer general Recognition Algorithm of License Plate can be used to be identified, can also be with It is identified using as mentioned in the embodiments of the present invention using the recognition methods of sliding window.
In the present embodiment, the image vector feature of target license plate image is extracted, and the image vector feature is input to The functional value for carrying out calculating classification function in preset support vector machines, to judge destination layer according to calculated functional value Number, realizes and judges automatically to the target number of plies, it is ensured that the accurate judgement of the double-deck license plate.
On the basis of the corresponding embodiment of Fig. 2, below by a specific embodiment come to being mentioned in step S20 And initial license plate image is pre-processed, obtain size be 2a × 2b target license plate image concrete methods of realizing carry out It is described in detail.
Referring to Fig. 4, Fig. 4 shows the specific implementation flow of step S20 provided in an embodiment of the present invention, details are as follows:
S21: by edge detection algorithm, the lower boundary of the coboundary of license plate and license plate in initial license plate image is obtained.
Specifically, since the factors such as the angle and distance of shooting influence, the license plate image taken is generally in addition to license plate area Except domain, it will also include some non-license plate images outside license plate area, these non-license plate images can make subsequent Car license recognition It thus in order to improve the accuracy rate of subsequent Car license recognition, needs to find out initial license plate figure by edge inspection algorithms at interference The coboundary of license plate and the lower boundary of license plate as in, so that it is determined that the license plate range in initial license plate image.
Wherein, edge detection algorithm is the algorithm for carrying out edge detection, and edge detection is image procossing and computer Basic problem in vision, in embodiments of the present invention, the purpose of edge detection are that brightness change is obvious in mark license plate image Point, i.e. the point on license plate boundary, the significant changes in image attributes usually reflect the critical event and variation of attribute, these figures As attribute includes but is not limited to: discontinuous, surface direction in depth is discontinuous, material property variation and scene lighting variation Deng.
Wherein, the edge of image refers to that region jumpy occurs for gray scale in image, and the situation of change of ganmma controller can To be reflected with the gradient of intensity profile.
Common edge detection algorithm includes but is not limited to: Sobel Operator (Sobel operator) edge detection is calculated Method, Gauss-Laplace edge detection algorithm, Luo Baici overlapping edges detection (Roberts Cross operator) are calculated Method and Canny multistage edge detection algorithm etc..
Preferably, the edge detection algorithm used by inventive embodiments is Canny multistage edge detection algorithm.
It is worth noting that the coboundary of obtained license plate and the lower boundary of license plate are two sections according to edge detection algorithm Line segment.That is, the coboundary for obtaining license plate includes two vertex in left and right, the lower boundary of obtained license plate includes two vertex in left and right.
S22: according to the lower boundary of the coboundary of license plate and license plate, the range image of license plate is determined.
Specifically, the lower boundary of the coboundary of license plate obtained in step S21 and license plate is connected, that is, by license plate The left side vertex of coboundary be connected with the left side vertex of the lower boundary of license plate, by the right vertex of the coboundary of license plate and license plate Lower boundary the right vertex be connected, so that a quadrangle is obtained, using the image in this square range as license plate Range image.
S23: slant correction is carried out to range image using Radon transform, the base image after being corrected.
Specifically, due to the influence of the angle and distance of shooting, the initial license plate image got can have inclination, in turn There is also inclinations for obtained range image, in order to improve the accuracy rate of subsequent Car license recognition, by Radon transform to range image Slant correction is carried out, thus the base image after being corrected.
Wherein, drawing eastern (radon) transformation is that one kind is superimposed by determining direction projection, angle when finding maximal projection value, from And determine image inclination angle, and then be corrected, the method for the image after being corrected.
S24: centered on the center of gravity of base image, cutting base image, and obtaining size is a × b pixel Target license plate image.
Specifically, right using b as vertical direction side length using a as horizontal direction side length centered on the center of gravity of base image The base image that step S23 is obtained is cut, and the target license plate image of the rectangle of an a × b pixel size is obtained.
Preferably, the preset a of the embodiment of the present invention is 140, b 28, that is, the target of 140 × 28 pixels finally obtained License plate image.
For example, in a specific embodiment, the coordinate of the center of gravity of base image is (82,21), and horizontal direction side length is 140, vertical direction side length is 28, then obtains top left corner apex coordinate (12,7), upper right corner apex coordinate (152,7), the lower left corner Apex coordinate (12,35), lower right corner apex coordinate (152,35), by the rectangle for 140 × 28 pixels that this four vertex form, Along this clipping rectangle base image, the image in the rectangular extent, i.e. target license plate image are obtained.
Preferably, after obtaining target license plate image, the embodiment of the present invention also carries out mean value to target license plate image And normalization, eliminate the difference in target license plate image between different dimensions image data.
Wherein, normalization refers to the characteristics of image amplitude normalization in target license plate image to same range, even if The standard deviation that all characteristics of image are removed with each characteristics of image, using obtained result as the image after characteristics of image normalization Feature.
Wherein, it goes mean value to refer to and each dimension of characteristics of image all centers in target license plate image is turned to 0, i.e., by target The central point of license plate image is withdrawn on coordinate origin.
In the present embodiment, by edge detection algorithm, obtain in initial license plate image under the coboundary and license plate of license plate Boundary, and then according to the lower boundary of the coboundary of license plate and license plate, it determines the range image of license plate, reuses Radon transform to model It encloses image and carries out slant correction, the base image after being corrected, then centered on the center of gravity of base image, to base image It is cut, obtains the target license plate image that size is a × b pixel, when so that subsequent use base image being identified, kept away Exempt from identification error caused by interference and the Tilt factor as the image outside license plate range, enhances the matter of target license plate image Amount, is conducive to the accuracy rate for improving subsequent Car license recognition.
On the basis of the corresponding embodiment of Fig. 4, below by a specific embodiment come to being mentioned in step S21 And by edge detection algorithm, obtain the specific implementation side of the lower boundary of the coboundary and license plate of license plate in initial license plate image Method is described in detail.
Referring to Fig. 5, Fig. 5 shows the specific implementation flow of step S21 provided in an embodiment of the present invention, details are as follows:
S211: noise removal is carried out to initial license plate image by Gaussian Blur, obtains denoising license plate image.
Specifically, the edge of license plate image is high-frequency signal, but the noise of image also focuses on high-frequency signal, it is easy to quilt It is mistakenly identified as edge, it is then desired to remove the noise of image, avoids the noise of image to determining edge bring interference.At this In inventive embodiments, noise removal is carried out to initial license plate image using Gaussian Blur, obtains denoising license plate image.
Wherein, the edge of license plate image refers to that gray scale occurs sharply in the image of license plate area and non-license plate area intersection The region of variation.The situation of change of ganmma controller can be reflected with the gradient of intensity profile.
Wherein, the noise of the noise of image namely image, refer to be present in it is unnecessary or extra in image data Interference information, the presence of noise have seriously affected the quality of image, therefore before image enhancement processing and classification processing, should With correct, in embodiments of the present invention, the correcting method used be use Gaussian Blur removal noise.
Wherein, Gaussian Blur (Gaussian Blur), is also Gaussian smoothing, it is a kind of image fuzzy filter, it is used Normal distribution calculates the transformation of each pixel in image, and picture noise is usually reduced with it and reduces level of detail.
It is worth noting that image border and noise are high-frequency signal, thus the radius selection of Gaussian Blur is critically important, Excessive radius is easy to allow some weak endpoint detections less than the specific setting of radius can be adjusted according to the actual situation It is whole, herein with no restriction.
S212: the gradient horizontally and vertically of denoising license plate image is calculated using preset gradient operator Value, obtains Initial Gradient value set.
Specifically, the edge of image can be pointed in different directions, and by using preset operator, calculate denoising license plate image Gradient value horizontally and vertically, obtain Initial Gradient value set.
Wherein, digital picture is exactly discrete point value spectrum, can also be two-dimensional discrete function, the gradient of image is exactly this The derivation of two-dimensional discrete function as a result, gradient operator, that is, the method for being used to calculate gradient.
Wherein, preset gradient operator includes but is not limited to: Sobel Operator (Sobel operator), Prewitt are calculated Son, Luo Baici operator (Roberts operator) and Canny operator.
Preferably, gradient operator used in the embodiment of the present invention is Canny operator.
S213: edge thinning processing is carried out to Initial Gradient value set by the way of the inhibition of non-maximum value, obtains one The wide gradient edge of pixel.
Specifically, edge thinning processing is carried out to Initial Gradient value set by the way of the inhibition of non-maximum value, obtains one The wide gradient edge of a pixel.
Wherein, non-maximum value inhibit (Non Maximum Suppression, NMS) be inhibit be not maximum element, It can be regarded as part and carry out maximum value search, to help to retain local maxima gradient and inhibit every other gradient value, this meaning Taste only remain position most sharp keen in change of gradient.
For example, in a specific embodiment, in vertical direction, thering is the gradient value of 4 pixel wides to constitute an office Portion searches out the maximum picture of gradient value in the gradient value of this part in lid part by the way of the inhibition of non-maximum value Vegetarian refreshments, as gradient edge, to realize edge thinning.
S214: using the weak marginal point in preset dual threshold filter gradient edge, the strong edge in gradient edge is obtained Point.
Specifically, edge pixel is distinguished by the way that dual threshold, i.e. a high threshold values and a low valve valve is arranged.If edge Pixel gradient value is greater than high threshold values, then is considered as strong edge point, if edge gradient value is less than high threshold values, is greater than low valve Value is then labeled as weak marginal point, and the point less than low valve valve is then suppressed, and strong edge point can be confirmed to be genuine edge, but Weak marginal point then may be genuine edge, it is also possible to accurate as a result, in this hair to obtain caused by noise or color change In bright embodiment, weak marginal point is also suppressed.
S215: according to strong edge point, the coboundary of license plate and the lower boundary of license plate are determined.
Specifically, it is obtained under the coboundary and license plate of license plate according to strong edge point by image procossings such as corrosion extensions Boundary.
Wherein, corrosion can eliminate independent point in strong edge point, and extension can be by adjacent but disjunct strong edge point It connects.
In the present embodiment, noise removal is carried out to initial license plate image by Gaussian Blur, obtains denoising license plate image, and The gradient value horizontally and vertically that denoising license plate image is calculated using preset gradient operator, obtains Initial Gradient Value set, and then edge thinning is carried out to Initial Gradient value set by the way of the inhibition of non-maximum value, it is wide to obtain a pixel Gradient edge obtain the strong edge point in gradient edge using the weak marginal point in preset dual threshold filter gradient edge, Then according to strong edge point, the coboundary of license plate and the lower boundary of license plate are determined, the accuracy rate of license plate edge detection is improved, has Conducive to the subsequent determination to license plate range.
On the basis of the corresponding embodiment of Fig. 2, below by a specific embodiment come to being mentioned in step S80 And by 3a-2c recognition result character form character set, character set is split according to default partitioning scheme, from To every sub- character set in obtain target character, and according to target character determine the concrete methods of realizing of target license plate number into Row is described in detail.
Referring to Fig. 6, Fig. 6 shows the specific implementation flow of step S80 provided in an embodiment of the present invention, details are as follows:
Character in a-c recognition result: being successively put into character set X by S81, obtains X={ x1, x2..., xq, In, q is the sum for the character for including, x in a-c recognition resultiFor i-th of character in character set X, i ∈ [1, q], q is positive Integer.
Specifically, the character for including in each recognition result is sequentially placed into initial value is to obtain X in empty character set X ={ x1, x2..., xq, wherein q is the sum for the character for including in a-c recognition result, and xi is i-th in character set X Character.
For example, in a specific embodiment, having obtained 112 recognition results, wherein preceding 20 recognition results are as follows: " ", " I ", " L ", " L ", " O ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai, I ", " B ", " B ", " B ", " B ", " B ", wherein the content in each double quotation marks is a recognition result, and each recognition result can be 1 character, Or sky, or multiple characters, this 20 recognition results are sequentially stored into character set X obtain X=" I ", " L ", " L ", " O ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " I ", " B ", " B ", “B”、“B”、“B”}。
S82: according to k+1 preset range, the k cut-off of character set X is determined, wherein k < q, and k is positive integer.
Specifically, it after step S81 obtains character set X, needs character set X carrying out cutting according to target character number A target character is determined at multiple sub- character set, and then according to every sub- character set.
In embodiments of the present invention, it is assumed that according to the character quantity k+1 of license plate to be identified, be previously provided with k+1 model It encloses, then determines k cut-off in character set X according to k+1 preset range.
Wherein, preset range is used to limit the preferred scope of each target character, for example, first preset range be (0, 15], i.e., using first recognition result to the 15th recognition result as first preset range.
By taking the example in step S81 as an example, if the first preset range be (0,15], obtained character set X=" I ", " L ", " L ", " O ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " Shanghai ", " I ", " B ", " B ", " B ", " B ", " B " }, then it chooses the 15th recognition result and is used as cut-off later, i.e., by the 15th element " I " of character set X and the 16th Position between a element " B " is as first cut-off.
It is worth noting that preset range may include decimal, for example, second preset range be (15,31.5], i.e., the Before two preset ranges include the 16th recognition result to all characters and second recognition result of the 31st recognition result 50% character.
Wherein, target character refers to the character in license plate number character, and current most of license plate number is 7 target words Symbol perhaps the number of 8 target characters thus target character be usually 7 or 8, also can be set according to actual needs for Other numerical value, are not specifically limited herein.
S83: character cutting is carried out to q character in character set X using k cut-off, obtains k+1 sub- character set.
Specifically, character cutting is carried out to the character in character set X using k obtained cut-off, obtains k+1 sub- words Symbol collects to arrive k+1 preferred scope.
Wherein, cutting refers to using two adjacent cut-offs as boundary, by all characters in two adjacent cutting point ranges As a sub- character set, first cut-off is made first character collection to all characters in the cutting point range For first sub- character set, for the last one cut-off, by all of the last one cut-off to a last character range Character is as last sub- character set.
S84: the most character of frequency of occurrence obtains k+1 target word as target character in every sub- character set of acquisition Symbol.
Specifically, for every sub- character set, the number occurred to character each in the sub- character set is counted, and will be gone out Target character of the most character of occurrence number as the sub- character set, obtains k+1 target character.
For example, in a specific embodiment, one of them sub- character set be " B ", " B ", " B ", " B ", " L ", " B ", " B ", " B ", " B ", " O ", " L ", " B ", " B ", " B ", " B " }, it is counted, obtaining result is comprising 12 characters " B ", two words Accord with " L " and a character " O ", the target character by character " B " as the sub- character set.
It is worth noting that the first aim character of license plate number is Chinese character, but in mind in the actual use of license plate In identification through network, since the Chinese character in part sliding image is not complete, may arrive causes Chinese character to be identified as capitalization English words It is most to obtain frequency of occurrence in first sub- character set if obtained first aim character is non-Chinese character by mother Chinese character is as first aim character.
S85: according to the sequence of k+1 preset range, k+1 target character is combined, obtains target license plate number.
Specifically, according to the sequence according to k+1 preset range, k+1 obtained target character is ranked up, mesh is obtained Mark license plate number.
For example, in a specific embodiment, there is 7 preset ranges, the corresponding sub- word character set of first preset range Target character be " Shanghai ", the target character of the corresponding sub- word character set of second preset range is " B ", third preset range The target character of corresponding sub- word character set is " 2 ", and the target character of the corresponding sub- word character set of the 4th preset range is " 6 ", the target character of the corresponding sub- word character set of the 5th preset range are " A ", the corresponding sub- word word of the 6th preset range The target character of symbol collection is " 6 ", and the target character of the corresponding sub- word character set of the 7th preset range is " 3 ", is combined It is " Shanghai B26A63 " to target license plate number.
In the present embodiment, by the way that successively the character in 3a-2c recognition result is put into character set X, and according to k+1 Preset range determines the k cut-off of character set X, and then carries out character to q character in character set X using k cut-off Cutting obtains k+1 sub- character set, and the most character of frequency of occurrence obtains k as target character in every sub- character set of acquisition + 1 target character is combined k+1 target character, obtains target license plate then according to the sequence of k+1 preset range Number, so that the character in target license plate image can be obtained, avoid according to pre- without being split to target license plate image If template to target carriage image carry out caused by partial character can not identify, the not high problem of the character accuracy rate identified, Improve the accuracy rate and stability of Car license recognition.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
In one embodiment, a kind of double-deck license plate recognition device, the bilayer license plate recognition device and above-described embodiment are provided Middle bilayer licence plate recognition method corresponds.As shown in fig. 7, the bilayer license plate recognition device includes obtaining module 10, pretreatment Module 20, hierarchical block 40, sliding block 50, terminates module 60, identification module 70 and segmentation module 80 at judgment module 30.Respectively Detailed description are as follows for functional module:
Module 10 is obtained, for obtaining initial license plate image;
Preprocessing module 20 obtains the mesh that size is 2a × 2b pixel for pre-processing to initial license plate image Mark license plate image, wherein a, b are positive integer;
Judgment module 30, for, to the progress number of plies detection of target license plate image, obtaining the target number of plies using support vector machines, Wherein, the target number of plies includes single layer and bilayer.
Target license plate image cropping at two sizes is 2a if being bilayer for the target number of plies by hierarchical block 40 The intermediate images of × b pixel, and using the intermediate images of 2a × b pixel of lower layer as lower image, by the 2a × b on upper layer Intermediate images cut, the image of a × b pixel size of central area is obtained, as upper layer images.
Sliding block 50, for using default size for the sliding window of c × b pixel, using 1 pixel as step-length, On the upper and lower tomographic image of upper layer images, slide is carried out from left to right, is slided every time, and the target within the scope of sliding window is obtained License plate image, as a sliding window image, wherein c < a and c are positive integer;
Module 60 is terminated, for the slide on upper layer being terminated, obtaining a-c after upper layer images, sliding a-c times A sliding window image after sliding 2a-c times in lower image, terminates the slide in lower layer, obtains 2a-c sliding window Mouth image, is obtained 3a-2c sliding window image;
Identification module 70 is identified for 3a-2c sliding window image to be input in convolutional neural networks, is obtained 3a-2c recognition result, wherein each recognition result includes several characters;
Divide module 80, for all characters in 3a-2c recognition result to be formed character set, according to default segmentation side Formula is split character set, obtains target character from every obtained sub- character set, and determine target according to target character License plate number.
Further, judgment module 30 includes:
Extraction unit 31, for extracting the image vector feature of target license plate image;
Computing unit 32, the functional value of the classification function for using following formula calculating characteristics of image:
F (x)=wTx+b
Wherein, f (x) is classification function, and w is the weight vector of the hyperplane of support vector machines, wTFor the weight of hyperplane The transposition of vector, x are image vector feature, and b is preset bias;
Judging unit 33, if being greater than or equal to 0 for functional value, it is determined that the target number of plies is bilayer.
Further, preprocessing module 20 includes:
Detection unit 21, for obtaining the coboundary of license plate and license plate in initial license plate image by edge detection algorithm Lower boundary;
Determination unit 22, for determining the range image of license plate according to the coboundary of license plate and the lower boundary of license plate;
Unit 23 is corrected, for carrying out slant correction to range image using Radon transform, the foundation drawing after being corrected Picture;
Unit 24 is cut, for being cut centered on the center of gravity of base image to base image, obtaining size is a The target license plate image of × b pixel.
Further, detection unit 21 includes:
Subelement 211 is denoised, for carrying out noise removal to initial license plate image by Gaussian Blur, obtains denoising license plate Image;
Computation subunit 212, for calculating the horizontal direction of denoising license plate image using preset gradient operator and hanging down Histogram to gradient value, obtain Initial Gradient value set;
Subelement 213 is refined, for carrying out edge thinning to Initial Gradient value set by the way of the inhibition of non-maximum value, Obtain the wide gradient edge of pixel;
It filters subelement 214 and obtains gradient side for using the weak marginal point in preset dual threshold filter gradient edge Strong edge point in edge;
Subelement 215 is delimited, for determining the coboundary of license plate and the lower boundary of license plate according to strong edge point.
Further, segmentation module 80 includes:
Generation unit 81 obtains X={ x for successively the character in 3a-2c recognition result to be put into character set X1, x2..., xq, wherein q is the sum for the character for including, x in 3a-2c recognition resultiFor i-th of character in character set X, I ∈ [1, q], q are positive integer;
Selection unit 82, for determining the k cut-off of character set X, wherein k < q, and k according to k+1 preset range For positive integer;
Cutting unit 83 obtains k+1 for using k cut-off to carry out character cutting to q character in character set X A sub- character set;
Preferred cell 84 obtains k for obtaining frequency of occurrence is most in every sub- character set character as target character + 1 target character;
Assembled unit 85 is combined k+1 target character, obtains mesh for the sequence according to k+1 preset range Mark license plate number.
Specific about the double-deck license plate recognition device limits the limit that may refer to above for the double-deck licence plate recognition method Fixed, details are not described herein.It is above-mentioned bilayer license plate recognition device in modules can fully or partially through software, hardware and its Combination is to realize.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction Composition can be as shown in Figure 8.The computer equipment include by system bus connect processor, memory, network interface and Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The database of machine equipment is used to store the initial license plate image of trained convolutional neural networks model and input.The computer is set Standby network interface is used to communicate with external terminal by network connection.To realize when the computer program is executed by processor A kind of bilayer licence plate recognition method.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory And the computer program that can be run on a processor, processor realize that above-described embodiment bilayer license plate is known when executing computer program The step of other method, such as step S10 shown in Fig. 2 to step S80.Alternatively, processor is realized when executing computer program State in embodiment the function of each module/unit of the double-deck license plate recognition device, such as module 10 shown in Fig. 7 is to the function of module 80 Energy.To avoid repeating, which is not described herein again.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated The double-deck licence plate recognition method in above method embodiment is realized when machine program is executed by processor, alternatively, the computer program quilt The function of each module/unit in the double-deck license plate recognition device in above-mentioned apparatus embodiment is realized when processor executes.To avoid weight Multiple, which is not described herein again.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of bilayer licence plate recognition method characterized by comprising
Obtain initial license plate image;
The initial license plate image is pre-processed, the target license plate image that size is 2a × 2b pixel is obtained, wherein a, B is positive integer;
Number of plies detection is carried out to the target license plate image using support vector machines, obtains the target number of plies, wherein the destination layer Number includes single layer and bilayer;
It at two sizes is 2a × b pixel by the target license plate image cropping if the target number of plies is bilayer Intermediate images, and using the intermediate images of 2a × b pixel of lower layer as lower image, by the intermediate images of the 2a × b on upper layer It is cut, the image of a × b pixel size of central area is obtained, as upper layer images;
Use default size for the sliding window of c × b pixel, using 1 pixel as step-length, respectively in the upper layer images and In the lower image, slide is carried out from left to right, and obtains target when sliding every time within the scope of the sliding window License plate image, as a sliding window image, wherein c < a and c are positive integer;
In the upper layer images, after sliding a-c time, the slide on upper layer is terminated, a-c sliding window image is obtained, After being slided 2a-c times in the lower image, the slide in the lower image is terminated, 2a-c sliding window is obtained 3a-2c sliding window image is obtained in image;
The 3a-2c sliding window images are input in convolutional neural networks and are identified, 3a-2c identification knot is obtained Fruit, wherein each recognition result includes several characters;
All characters in the 3a-2c recognition results are formed into character set, according to default partitioning scheme to the character set It is split, obtains target character from every obtained sub- character set, and the target carriage trade mark is determined according to the target character Code.
2. bilayer licence plate recognition method as described in claim 1, which is characterized in that described to use support vector machines to the mesh It marks license plate image and carries out number of plies detection, obtaining the target number of plies includes:
Extract the image vector feature of the target license plate image;
The functional value of the classification function of described image feature is calculated using following formula:
F (x)=wTx+b
Wherein, f (x) is the classification function, and w is the weight vector of the hyperplane of the support vector machines, wTFor the hyperplane Weight vector transposition, x be described image vector characteristics, b be preset bias;
If the functional value is greater than or equal to 0, it is determined that the target number of plies is bilayer.
3. bilayer licence plate recognition method as described in claim 1, which is characterized in that described to be carried out to the initial license plate image Pretreatment, obtaining the target license plate image that size is 2a × 2b pixel includes:
By edge detection algorithm, the coboundary of license plate and the lower boundary of license plate in the initial license plate image are obtained;
According to the lower boundary of the coboundary of the license plate and the license plate, the range image of license plate is determined;
Slant correction is carried out to the range image using Radon transform, the base image after being corrected;
Centered on the center of gravity of the base image, the base image is cut, obtaining size is 2a × 2b pixel The target license plate image.
4. bilayer licence plate recognition method as claimed in claim 3, which is characterized in that it is described by edge detection algorithm, it obtains The coboundary of license plate and the lower boundary of license plate include: in the initial license plate image
Noise removal is carried out to the initial license plate image by Gaussian Blur, obtains denoising license plate image;
The gradient value horizontally and vertically that the denoising license plate image is calculated using preset gradient operator, is obtained Initial Gradient value set;
Edge thinning processing is carried out to the Initial Gradient value set by the way of the inhibition of non-maximum value, it is wide to obtain a pixel Gradient edge;
The weak marginal point in the gradient edge is filtered using preset dual threshold, obtains the strong edge in the gradient edge Point;
According to the strong edge point, the coboundary of the license plate and the lower boundary of the license plate are determined.
5. such as the described in any item double-deck licence plate recognition methods of Claims 1-4, which is characterized in that described described by 3a-2c Character in recognition result forms character set, and obtains target character from the character set according to predetermined manner, according to described Target character determines that target license plate number includes:
Successively the character in the 3a-2c recognition results is put into character set X, obtains X={ x1, x2..., xq, wherein Q is the sum for the character for including, x in 3a-2c recognition resultiFor i-th of character in character set X, i ∈ [1, q], q is positive Integer;
According to k+1 preset range, the k cut-off of the character set X is determined, wherein k < q, and k is positive integer;
Character cutting is carried out to q character in the character set X using the k cut-offs, obtains k+1 sub- character set;
Frequency of occurrence is most in each sub- character set character is obtained as target character, obtains the k+1 target words Symbol;
According to the sequence of the k+1 preset ranges, the k+1 target characters are combined, the target license plate is obtained Number.
6. it is a kind of bilayer license plate recognition device, which is characterized in that it is described bilayer license plate recognition device include:
Module is obtained, for obtaining initial license plate image;
Preprocessing module obtains the target that size is 2a × 2b pixel for pre-processing to the initial license plate image License plate image, wherein a, b are positive integer;
Judgment module, for, to target license plate image progress number of plies detection, obtaining the target number of plies using support vector machines, In, the target number of plies includes single layer and bilayer;
Hierarchical block, if for the target number of plies be bilayer, be at two sizes by the target license plate image cropping The intermediate images of 2a × b pixel, and using the intermediate images of 2a × b pixel of lower layer as lower image, by the 2a on upper layer The intermediate images of × b pixel are cut, and the image of a × b pixel size of central area are obtained, as upper layer images;
Sliding block, for using default size for the sliding window of c × b, using 1 pixel as step-length, respectively on the upper layer Image neutralizes in the lower image, carries out slide from left to right, and obtains sliding window range when sliding every time Interior target license plate image, as a sliding window image, wherein c < a and c are positive integer;
Module is terminated, for after sliding a-c times, the slide on upper layer being terminated, obtaining a-c in the upper layer images Sliding window image after sliding 2a-c times in the lower image, terminates the slide in the lower image, obtains 3a-2c sliding window image is obtained in 2a-c sliding window image;
Identification module is identified for the 3a-2c sliding window images to be input in convolutional neural networks, is obtained 3a-2c recognition result, wherein each recognition result includes several characters;
Divide module, for all characters in the 3a-2c recognition results to be formed character set, according to default partitioning scheme The character set is split, obtains target character from every obtained sub- character set, and true according to the target character Set the goal license plate number.
7. bilayer license plate recognition device as claimed in claim 6, which is characterized in that the judgment module includes:
Extraction unit, for extracting the image vector feature of the target license plate image;
Computing unit, the functional value of the classification function for using following formula calculating described image feature:
F (x)=wTx+b
Wherein, f (x) is the classification function, and w is the weight vector of the hyperplane of the support vector machines, wTFor the hyperplane Weight vector transposition, x be described image vector characteristics, b be preset bias;
Judging unit, if being greater than or equal to 0 for the functional value, it is determined that the target number of plies is bilayer.
8. bilayer license plate recognition device as claimed in claim 6, which is characterized in that the segmentation module includes:
Generation unit obtains X={ x for successively the character in the 3a-2c recognition results to be put into character set X1, x2..., xq, wherein q is the sum for the character for including, x in 3a-2c recognition resultiFor i-th of character in character set X, I ∈ [1, q], q are positive integer;
Selection unit, for determining the k cut-off of the character set X according to k+1 preset range, wherein k < q, and k is Positive integer;
Cutting unit obtains k+ for using the k cut-offs to carry out character cutting to q character in the character set X 1 sub- character set;
Preferred cell obtains k+1 for obtaining frequency of occurrence is most in each sub- character set character as target character A target character;
Assembled unit is combined the k+1 target characters, obtains for the sequence according to the k+1 preset ranges The target license plate number.
9. a kind of computer equipment, including memory, processor and storage are in the memory and can be in the processor The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to The step of any one of 5 double-deck licence plate recognition method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In realizing the double-deck licence plate recognition method as described in any one of claim 1 to 5 when the computer program is executed by processor Step.
CN201811119253.5A 2018-09-25 2018-09-25 Double-layer license plate recognition method and device, computer equipment and storage medium Active CN109447117B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811119253.5A CN109447117B (en) 2018-09-25 2018-09-25 Double-layer license plate recognition method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811119253.5A CN109447117B (en) 2018-09-25 2018-09-25 Double-layer license plate recognition method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109447117A true CN109447117A (en) 2019-03-08
CN109447117B CN109447117B (en) 2023-06-30

Family

ID=65544415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811119253.5A Active CN109447117B (en) 2018-09-25 2018-09-25 Double-layer license plate recognition method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109447117B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110210475A (en) * 2019-05-06 2019-09-06 浙江大学 A kind of characters on license plate image partition method of non-binaryzation and edge detection
CN111695563A (en) * 2020-06-10 2020-09-22 北京筑梦园科技有限公司 Single-layer and double-layer license plate recognition method, server and parking charging system
CN111950659A (en) * 2020-09-01 2020-11-17 湖南国科微电子股份有限公司 Double-layer license plate image processing method and device, electronic equipment and storage medium
CN112215224A (en) * 2020-10-22 2021-01-12 深圳市平方科技股份有限公司 Deep learning-based trailer number identification method and device
CN112686246A (en) * 2019-10-18 2021-04-20 深圳市优必选科技股份有限公司 License plate character segmentation method and device, storage medium and terminal equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130272579A1 (en) * 2012-04-17 2013-10-17 Xerox Corporation Robust cropping of license plate images
CN106529532A (en) * 2016-11-07 2017-03-22 湖南源信光电科技有限公司 License plate identification system based on integral feature channels and gray projection
CN107103317A (en) * 2017-04-12 2017-08-29 湖南源信光电科技股份有限公司 Fuzzy license plate image recognition algorithm based on image co-registration and blind deconvolution
WO2018028306A1 (en) * 2016-08-11 2018-02-15 杭州海康威视数字技术股份有限公司 Method and device for recognizing license plate number
CN108073928A (en) * 2016-11-16 2018-05-25 杭州海康威视数字技术股份有限公司 A kind of licence plate recognition method and device
CN108416348A (en) * 2018-01-29 2018-08-17 重庆邮电大学 Plate location recognition method based on support vector machines and convolutional neural networks

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130272579A1 (en) * 2012-04-17 2013-10-17 Xerox Corporation Robust cropping of license plate images
WO2018028306A1 (en) * 2016-08-11 2018-02-15 杭州海康威视数字技术股份有限公司 Method and device for recognizing license plate number
CN106529532A (en) * 2016-11-07 2017-03-22 湖南源信光电科技有限公司 License plate identification system based on integral feature channels and gray projection
CN108073928A (en) * 2016-11-16 2018-05-25 杭州海康威视数字技术股份有限公司 A kind of licence plate recognition method and device
CN107103317A (en) * 2017-04-12 2017-08-29 湖南源信光电科技股份有限公司 Fuzzy license plate image recognition algorithm based on image co-registration and blind deconvolution
CN108416348A (en) * 2018-01-29 2018-08-17 重庆邮电大学 Plate location recognition method based on support vector machines and convolutional neural networks

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
裴明涛等: "基于多尺度模板匹配和部件模型的车牌字符分割方法", 《北京理工大学学报》, vol. 34, no. 9, pages 961 - 965 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110210475A (en) * 2019-05-06 2019-09-06 浙江大学 A kind of characters on license plate image partition method of non-binaryzation and edge detection
CN110210475B (en) * 2019-05-06 2021-05-18 浙江大学 License plate character image segmentation method based on non-binarization and edge detection
CN112686246A (en) * 2019-10-18 2021-04-20 深圳市优必选科技股份有限公司 License plate character segmentation method and device, storage medium and terminal equipment
CN112686246B (en) * 2019-10-18 2024-01-02 深圳市优必选科技股份有限公司 License plate character segmentation method and device, storage medium and terminal equipment
CN111695563A (en) * 2020-06-10 2020-09-22 北京筑梦园科技有限公司 Single-layer and double-layer license plate recognition method, server and parking charging system
CN111695563B (en) * 2020-06-10 2022-07-05 北京筑梦园科技有限公司 Single-layer and double-layer license plate recognition method, server and parking charging system
CN111950659A (en) * 2020-09-01 2020-11-17 湖南国科微电子股份有限公司 Double-layer license plate image processing method and device, electronic equipment and storage medium
CN112215224A (en) * 2020-10-22 2021-01-12 深圳市平方科技股份有限公司 Deep learning-based trailer number identification method and device

Also Published As

Publication number Publication date
CN109447117B (en) 2023-06-30

Similar Documents

Publication Publication Date Title
CN109447117A (en) The double-deck licence plate recognition method, device, computer equipment and storage medium
CN110008809B (en) Method and device for acquiring form data and server
CN109492642A (en) Licence plate recognition method, device, computer equipment and storage medium
CN104751142B (en) A kind of natural scene Method for text detection based on stroke feature
CN110781885A (en) Text detection method, device, medium and electronic equipment based on image processing
CN109670500A (en) A kind of character area acquisition methods, device, storage medium and terminal device
CN108108731B (en) Text detection method and device based on synthetic data
CN104809731B (en) A kind of rotation Scale invariant scene matching method based on gradient binaryzation
CN109949227A (en) Image split-joint method, system and electronic equipment
EP2613294A1 (en) System and method for synthesizing portrait sketch from photo
CN107545223B (en) Image recognition method and electronic equipment
CN111680690B (en) Character recognition method and device
CN111445459A (en) Image defect detection method and system based on depth twin network
CN111951154B (en) Picture generation method and device containing background and medium
CN110942071A (en) License plate recognition method based on license plate classification and LSTM
CN113392856B (en) Image forgery detection device and method
CN107578011A (en) The decision method and device of key frame of video
CN105404868A (en) Interaction platform based method for rapidly detecting text in complex background
CN110599453A (en) Panel defect detection method and device based on image fusion and equipment terminal
Chen et al. Single depth image super-resolution using convolutional neural networks
CN103455816B (en) Stroke width extraction method and device and character recognition method and system
CN109508716B (en) Image character positioning method and device
Xu et al. License plate recognition system based on deep learning
CN111340139B (en) Method and device for judging complexity of image content
CN106056575B (en) A kind of image matching method based on like physical property proposed algorithm

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
GR01 Patent grant
GR01 Patent grant