CN103116751B - A kind of Method of Automatic Recognition for Character of Lcecse Plate - Google Patents

A kind of Method of Automatic Recognition for Character of Lcecse Plate Download PDF

Info

Publication number
CN103116751B
CN103116751B CN201310028106.8A CN201310028106A CN103116751B CN 103116751 B CN103116751 B CN 103116751B CN 201310028106 A CN201310028106 A CN 201310028106A CN 103116751 B CN103116751 B CN 103116751B
Authority
CN
China
Prior art keywords
license plate
character
image
characters
plate
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.)
Expired - Fee Related
Application number
CN201310028106.8A
Other languages
Chinese (zh)
Other versions
CN103116751A (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.)
Hohai University HHU
Original Assignee
Hohai University HHU
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 Hohai University HHU filed Critical Hohai University HHU
Priority to CN201310028106.8A priority Critical patent/CN103116751B/en
Publication of CN103116751A publication Critical patent/CN103116751A/en
Application granted granted Critical
Publication of CN103116751B publication Critical patent/CN103116751B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of Method of Automatic Recognition for Character of Lcecse Plate, comprise the following steps: input color vehicle image;Image is carried out pretreatment;Algorithms of different is selected to carry out License Plate under different light condition;Car plate carries out horizontal tilt rectification and vertical tilt is corrected;The car plate that step d is obtained by the method based on cluster connection and upright projection is adopted to carry out Character segmentation;Use the template matching method improved that step e obtains character and carry out character recognition;The recognition result of output step f.The Method of Automatic Recognition for Character of Lcecse Plate of the present invention, significantly increases the serviceability of whole characters on license plate automatic recognition system.In described License Plate step, the present invention can utilize the feature of license plate area, selects algorithms of different to carry out License Plate, it is ensured that also can be accurately positioned license plate area position when there is interference under different light condition.

Description

A kind of Method of Automatic Recognition for Character of Lcecse Plate
Technical field
The invention belongs to computer vision and area of pattern recognition, relate to the multi-door subjects such as pattern recognition, Digital Image Processing, artificial intelligence, computer science, be specifically related to a kind of Method of Automatic Recognition for Character of Lcecse Plate.
Background technology
Along with the expansion of city size, the vehicles number inside city increases sharply, and traditional labor management traffic has not adapted to this change.Therefore, intelligent transportation system by large-scale application in urban traffic control and scheduling in.Wherein Car license recognition (VehicleLicensePlateRecognition, VLPR) is the core in intelligent transportation system.
Car license recognition is the important component part in modern intelligent transportation system, applies very extensive.Based on the technology such as it identifies in mode, computer vision, Digital Image Processing.By a series of process of car plate data being realized the functions such as the measurement of traffic flow Con trolling index, vehicle location, the supervision of high way super speed automatization, break in traffic rules and regulations candid photograph, toll station and parking lot fee collection management.Automatically identifying for safeguarding traffic safety and urban public security of license plate, it is prevented that traffic jam, it is achieved traffic automation management has great significance.
Accordingly, it would be desirable to a kind of Method of Automatic Recognition for Character of Lcecse Plate.
Summary of the invention
Goal of the invention: the present invention is directed to the defect that prior art exists in Car license recognition, it is provided that a kind of Method of Automatic Recognition for Character of Lcecse Plate.
Technical scheme: for solving above-mentioned technical problem, a kind of Method of Automatic Recognition for Character of Lcecse Plate of the present invention adopts the following technical scheme that
A kind of Method of Automatic Recognition for Character of Lcecse Plate, comprises the following steps:
A, input color vehicle image;
B, the colored vehicle image that step a is obtained carry out pretreatment;
In the reasonable situation of c, by day light, colored vehicle image step b obtained by search and the morphologic algorithm of locating license plate of vehicle of mathematics based on color dot is adopted to carry out License Plate;Light is not good by day or in night situation, adopts the colored vehicle image that step b is obtained by the algorithm of locating license plate of vehicle based on gray level image to carry out License Plate;The present invention is with illuminance 8000lx for separation, when illuminance is more than 8000lx, adopts colored vehicle image step b obtained by search and the morphologic algorithm of locating license plate of vehicle of mathematics based on color dot to carry out License Plate;When illuminance is less than 8000lx, the colored vehicle image that step b is obtained by the algorithm of locating license plate of vehicle based on gray level image is adopted to carry out License Plate.
D, the car plate respectively step c location obtained carry out horizontal tilt rectification and vertical tilt is corrected;
The car plate that step d is obtained by e, employing based on the method clustering connection and upright projection carries out Character segmentation;
Step e is obtained character and carries out character recognition by the template matching method that f, use improve;
G, output step f recognition result.
Beneficial effect: the Method of Automatic Recognition for Character of Lcecse Plate of the present invention, significantly increases the serviceability of whole characters on license plate automatic recognition system.In described License Plate step, the present invention can utilize the feature of license plate area, selects algorithms of different to carry out License Plate, it is ensured that also can be accurately positioned license plate area position when there is interference under different light condition.
Further, pretreatment described in step b includes image smoothing method and/or filtering and noise reduction method.
Further, car plate background color and characters on license plate color difference in gray scale is utilized to find out car plate region based on the algorithm of locating license plate of vehicle of search color dot pair with mathematical morphology described in step c.
Further, it is assumed that the character color of car plate is A color, and the background color of car plate is B color, described in step c, the described algorithm of locating license plate of vehicle based on search color dot pair with mathematical morphology comprises the following steps:
(1) coloured image containing vehicle is carried out gray processing and binary conversion treatment, calculate maximum variance threshold value, obtain corresponding bianry image;
(2) opening up one piece of region of memory in calculator memory, be used for storing binary image data, the length and width of bianry image are equal with the length and width of coloured image, and the value of each pixel is initialized as 255;
(3) the A colour vegetarian refreshments in scanning bianry image, if finding B colour vegetarian refreshments on the left of coloured image relevant position, then think that this A colour vegetarian refreshments is the start boundary point of characters on license plate and car plate background color, i.e. the starting pixels point of characters on license plate, the position of this point of labelling;
(4) the A colour vegetarian refreshments of bianry image is continued to scan on, if find B colour vegetarian refreshments on the right side of coloured image relevant position, then think that this A colour vegetarian refreshments is the termination boundary point of characters on license plate and car plate background color, i.e. the position of this point of the termination pixel of characters on license plate, and labelling;
(5) if the termination pixel phase difference of the starting pixels point of characters on license plate and characters on license plate is within 50 pixels, then it is assumed that this block region is characters on license plate pixel region, and with these points of black pixel point labelling in the image of step 3;
(6) complete scan entire image, until finding out all A normal complexion B color color dot pair in image;
(7) use two-value opening operation to process the color dot that step (6) is obtained to process;
(8) use etching operation that two-value opening operation is processed later color to processing, expand the scope of color dot pair further;
(9) using expansive working to color dot to processing, obtain continuous sheet of pixel region, this block region is exactly car plate candidate regions.When light is more abundant, adopting based on color dot to search and the morphologic algorithm of locating license plate of vehicle of mathematics, this algorithm has significantly high locating accuracy under light preferably situation;
Further, algorithm of locating license plate of vehicle based on gray level image described in step c comprises the following steps:
A, first to the coloured image containing vehicle being carried out gray processing and binary conversion treatment;
B, the method adopting every fourfold interlacing a line, the line number r that labelling monochrome pixels point change frequency is maximumm, and write down change frequency m;
C, with rmBased on, statistically lower 3 row, it is judged that its monochrome pixels point change frequency whether with rmClose, the scope of the change frequency of the monochrome pixels point of license plate area is from 0.75m to 1.25m, and namely in car plate, the number of times of black and white change is within a stability range, but not the monochrome pixels change frequency of license plate area is unstable;
D, repetition step b and step c, obtain the up-and-down boundary of car plate, so that it is determined that car plate candidate regions.
When light is not good, adopting the algorithm of locating license plate of vehicle based on textural characteristics improved, this algorithm is every 3 row run-downs, it is possible to be greatly improved the real-time of system.
Further, in step d, the horizontal tilt rectification of car plate and vertical tilt are corrected and are respectively adopted the horizontal tilt correction method minimum based on car plate marginal point vertical coordinate variance and the car plate entirety vertical skew correction method based on single character vertical tilt angle carries out.In license plate sloped aligning step, advanced row license plate binary, then carry out the correction on different directions.
Further, first finding out the connected domain in image based on the method for cluster connection and upright projection described in step e, connected domain is screened by the priori again through car plate.This algorithm is a kind of accuracy rate that can improve Character segmentation, the algorithm that robustness is high again.
Further, comprise the following steps based on the method for cluster connection and upright projection described in step e:
(1) license plate image is carried out binary conversion treatment.
(2) by the image after processing by row scanning, if two pel spacings are from d <=dconst, then it is assumed that the two pixel belongs to a class, namely two pixels in a character;
(3) what screening obtained is all kinds of, removes the height class less than Height/2, and obtaining class after screening is 7 characters and left and right side frame;
(4) all kinds of original positions according to name placement from left to right.License plate binary adopts modified model local binarization method, experiment to prove that the method also is able to when light is not good well go to separate characters on license plate and background to;
Further, d is defined as:
D (A, B)=| x1-x2|+|y1-y2|,
The d of Chinese characterconstValue is 2 or 3, the d of English character and numeralconstValue is 2.
Further, the template matching method improved in step f comprises the following steps:
(1) matching template storehouse is set up;
(2) characters on license plate is carried out refinement computing so that the stroke width of character is a pixel wide;
(3) characters on license plate that step (2) is obtained filters discrete noise point;
(4) being normalized by the characters on license plate after refining and filtering discrete noise point, carry out image inversion process after normalized, car plate background becomes white, character becomes black;
(5) characters on license plate image step (4) obtained and matching template storehouse contrast, and obtain matching template;
(6) scanning car plate character picture, when running into a character pixels, nearest character pixels point is found within the scope of the pixel region of matching template 5 × 5, and calculate the size of nearest character pixels point and matching template minimum distance, calculate the minimum range sum of characters on license plate pixel and matching stencil, find out the minimum range sum of characters on license plate and matching template;
(7) scan matching template image, when running into a character pixels, nearest character pixels point is found within the scope of the pixel region of characters on license plate 5 × 5, and calculate the size of nearest character pixels point and characters on license plate minimum distance, calculate the minimum range sum of matching stencil and characters on license plate, find out the minimum range sum of matching stencil and characters on license plate;
(8) comparing the minimum range sum of (6) and (7), the corresponding templates that gets the small value is as the matching result of characters on license plate.
(9) according to above-mentioned steps, characters on license plate is mated one by one, finally give license board information.In described character recognition step, template matching method is improved, further the characters on license plate that obtains after segmentation has been carried out micronization processes, the rate that significantly improves that the match is successful.
Accompanying drawing explanation
The flow chart of the Method of Automatic Recognition for Character of Lcecse Plate of Fig. 1 present invention.
Detailed description of the invention
Below in conjunction with the drawings and specific embodiments, it is further elucidated with the present invention, it should be understood that these embodiments are merely to illustrate the present invention rather than restriction the scope of the present invention, after having read the present invention, the amendment of the various equivalent form of values of the present invention is all fallen within the application claims limited range by those skilled in the art.
As shown in Figure 1, the Method of Automatic Recognition for Character of Lcecse Plate of the present invention first passes through image or the video interception of video camera shooting, convert digitized image input computer (step 101) to, then input picture is carried out pretreatment (step 102), then according to different light condition, diverse ways is used to orient car plate position (step 103);The slant correction (step 104) to license plate image is realized followed by digital image processing methods such as binaryzation, horizontal tilt correction and vertical skew corrections;Again independent character is split (step 105) from license plate image;Technology finally by pattern recognition realizes the identification (step 106) automatically to characters on license plate.
China's car plate mainly has wrongly written or mispronounced character of the blue end, yellow end surplus, black matrix wrongly written or mispronounced character, the dark red word these four of white background.For blue end wrongly written or mispronounced character car plate, the Method of Automatic Recognition for Character of Lcecse Plate of the present invention is described in detail below.
License Plate is always up the difficult point in Vehicle License Recognition System, and in license plate image, substantial amounts of interference and light irradiate the factor such as strong and weak, car plate is reflective and all can affect the accuracy of License Plate.The present invention proposes the algorithm of locating license plate of vehicle that two kinds of algorithm of locating license plate of vehicle combine: by day in the reasonable situation of light, adopts based on color dot search and the morphologic algorithm of locating license plate of vehicle of mathematics;Light is good or adopt a kind of novel algorithm of locating license plate of vehicle based on gray level image night in situation by day.Algorithm of locating license plate of vehicle in the present invention needs the support of light sensor, and the intensity of the external environment condition light received by light sensor determines to use which kind of algorithm to carry out License Plate.The present invention is with illuminance 8000lx for separation, when illuminance is more than 8000lx, adopts, based on color dot, to the colored vehicle image obtained, search and the morphologic algorithm of locating license plate of vehicle of mathematics is carried out License Plate;When illuminance is less than 8000lx, adopt the algorithm of locating license plate of vehicle based on gray level image that the colored vehicle image obtained is carried out License Plate.
Owing to being likely to containing the color close with car plate color on vehicle body, adding the reasons such as oxidation causes that car plate fades, these interference are all likely to reduce the precision of License Plate.The algorithm of locating license plate of vehicle based on search color dot pair with mathematical morphology that the present invention proposes utilizes car plate background color and characters on license plate color difference in gray scale to find out car plate region, has good capacity of resisting disturbance.Specifically comprise the following steps that
(1) coloured image containing vehicle is carried out gray processing and binary conversion treatment, calculate maximum variance threshold value, obtain corresponding bianry image;
(2) opening up one piece of region of memory in calculator memory, for storing the view data of 8, image length and width are equal with coloured image, and the value of each pixel is initialized as 255;
(3) the white pixel point in scanning bianry image, if finding blue pixel point on the left of coloured image relevant position, then think that this white pixel point is the start boundary point of characters on license plate and car plate background color, i.e. the starting pixels point of characters on license plate, the position of this point of labelling;
(4) the white pixel point of bianry image is continued to scan on, if find blue pixel point on the right side of coloured image relevant position, then think that this white pixel point is the termination boundary point of characters on license plate and car plate background color, i.e. the position of this point of the termination pixel of characters on license plate, and labelling;
(5) if the termination pixel phase difference of the starting pixels point of characters on license plate and characters on license plate is within 50 pixels, then it is assumed that this block region is characters on license plate pixel region, and with these points of black pixel point labelling in the image of step 3;
(6) complete scan entire image, until all blue white colour point pair found out in image;
(7) use two-value to open operation process color dot is processed.
(8) use etching operation to split two-value and open the later color of operation to processing, continuously perform ten times, expand the scope of color dot pair further.
(9) using expansive working to continue color dot processing, obtain the pixel region of a piece of basic continuous, this block region is exactly car plate candidate regions.
Noticing that the blueness used in the present invention is a vague definition, the blueness in actual license plate has navy blue and light blue, it is contemplated that due to reasons such as oxidations, the background color of car plate can shoal, so being only one general qualifications of blue definition.This condition rule of thumb sets, and can change according to this condition of different light conditions.As long as the pixel in coloured image meets this condition, can think that this pixel is blue pixel point.Concrete, if this pixel meets following three below condition: (1) B > 1.5*R;(2)B>1.5*G;(3) it is blue pixel point that B > 100 is considered as this pixel.Equally, white is also a misty idea.If a pixel meets following four condition: (1) R < 0.4*S;(2)G<0.4*S;(3)B<0.4*S;(4) it is white pixel point that S > 200 is considered as this pixel.Wherein S=R+G+B.
The car plate candidate regions now obtained, it may be possible to car plate region, it is also possible to noise or interference region.The priori that can utilize car plate removes pseudo-license plate area, thus obtaining real license plate area.The length of usual license plate area with wide all should more than certain pixel value, and the ratio grown tall of car plate should between 2: 1 to 4: 1.
In or night not good at light situation, the color characteristic of car plate is inconspicuous, based on color dot, searching algorithm being likely to the color dot pair that can not find in image if still adopted, causing positioning unsuccessfully.The present invention adopts a kind of License Plate new algorithm based on gray level image when light is not good.First image is carried out gray processing and binary conversion treatment.Because automotive license plate is generally suspended on bottom of car, so the present invention adopts searching method from the bottom up, so can not only improve search speed, also can improve the success rate of search.The method adopting every fourfold interlacing a line, the line number r that labelling monochrome pixels point change frequency is maximumm, and write down change frequency m.Generally car plate height is about 50 pixels, in the horizontal sweep process of license plate area, arises that, every 3 row, the row that monochrome pixels point change frequency is relatively more, and such guild occurs about 17 times continuously, writes down these line number ri(i=1,2 ...), with riBased on, statistically lower 3 row, it is judged that its monochrome pixels point change frequency whether with riSimilar, rule of thumb the scope of the change frequency of the monochrome pixels point of known license plate area is from 0.75m to 1.25m, so the number of times of black and white change is within a stability range in car plate, but not the monochrome pixels change frequency of license plate area is unstable.Orient the up-and-down boundary of car plate by algorithm above and be substantially the height of characters on license plate, but will by location up-and-down boundary expanded range out in actual treatment, this is done to leave certain process space to follow-up license plate area slant correction, it is to avoid car plate useful part excised.
Owing to the difference that result in shooting angle is fixed in the position of photographing unit, more or less there is the situation of inclination in the license plate image obtained after location.Inclination can affect follow-up License Plate Character Segmentation, causes segmentation errors, so license plate image is carried out slant correction before Character segmentation, can accurately split ready for character below.License plate sloped it is divided into Three models: horizontal direction tilts, superposition inclined vertically, horizontal is inclined vertically, therefore license plate sloped correction can carry out from horizontal and vertical directions, generally first carry out horizontal tilt correction, determine the up-and-down boundary of characters on license plate, finally carry out vertical skew correction.The present invention uses the car plate horizontal tilt correcting algorithm minimum based on vertical edge spot projection variance and based on the minimum car plate vertical skew correction algorithm of horizontal edge point variance.
Need before carrying out license plate sloped correction gray scale license plate image is carried out binary conversion treatment.The present invention adopts the local binarization method of improvement, and characters on license plate and car plate background can be separated well by it when uneven illumination and car plate have stained.Assume (x, y) is the pixel wanting binaryzation, and its close region is the window of a w × w, gray value be f (x, y), calculates the threshold value of each pixel:
T ( x , y ) = &alpha; ( max - w < l < w - w < k < w f ( x + k , y + l ) + min - w < l < w - w < k < w f ( x + k , y + l ) )
Here α is an empirical value, and span is between 0.40 and 0.65.
Obtaining character pixels point in the ratio shared by whole license plate image about 30% by adding up, if it is considered that noise factor, this reaches about 35% than regular meeting.Therefore one global threshold K can be set.Assume h (x, y) is the license plate image statistical value at a certain gray value, definition K be:
k = { g | max 0 &le; g &le; 255 [ &Sigma; i = g 255 h ( x , y ) &Sigma; i = 0 255 h ( x , y ) ] &GreaterEqual; 35 % }
If car plate is only carried out binaryzation with global threshold K by us, the negative effect that binaryzation is brought by very difficult elimination uneven illumination or background acute variation.Therefore in conjunction with threshold k and binaryzation method, license plate image must be carried out binary conversion treatment and can be only achieved desirable effect, specifically comprise the following steps that
(1) global threshold K is calculated.
(2) local threshold of all pixels is obtained by Bernsen binaryzation method.
(3) value the greater is taken between global threshold K and local threshold as the threshold value of pixel.
In binarization, image is likely to occur the noise that some are discrete, and therefore removing noise is requisite process.Conventional filter method such as mean filter and medium filtering are not suitable for processing character image, because may filter character pixels in the process of filtering.The present invention uses following algorithm:
(1) by line-scanning image, it has been found that during a white pixel point, in its neighborhood of 3 × 3, the quantity of white pixel point is found, it is considered to 8 pixels adjacent with white pixel.
(2) threshold value is set, if white pixel point number is more than this threshold value about, then it is assumed that this point is not discrete noise point, is otherwise considered as noise spot and removes.In the present invention, threshold value value is 5.
(3) all discrete pixels points are removed by scanning entire image.
Before carrying out horizontal tilt correction, it is necessary to first the license plate image of binaryzation is carried out rim detection.Rim detection utilizes the zero crossing information of image first derivative or second dervative to provide the basic foundation judging marginal point.The present invention uses Sobel operator.
By obtaining all marginal points in image after rim detection, the central point making these marginal points is M (mx,my), it is possible to asked for by below formula:
m x = 1 N &Sigma; i = 1 N x i , m y = 1 N &Sigma; i = 1 N y i
X in formulaiWith yiAbscissa and vertical coordinate for car plate marginal point.
Car plate edge image place coordinate origin is moved on to M point, at this moment car plate marginal point vertical coordinate averageAfter coordinate converts, the coordinate of car plate marginal point there occurs change, wherein:
ui=xi-mx,vi=yi-my
Assume B (u, v) in two-dimensional direct angle coordinate system a bit, angle of this point and x-axis is β, and its vertical coordinate is v.B Dian Rao center is rotated clockwise α angle to putting B'(u', v '), the vertical coordinate of some B' is v ', it is possible to obtain following derivation:
v &prime; r sin ( &beta; - &alpha; ) = v sin ( &beta; - &alpha; ) sin &beta; = v cos &alpha; - u sin &alpha;
Variance after coordinate transform and marginal point rotate is as follows:
&sigma; 2 = 1 N &Sigma; i = 1 N ( v i cos &alpha; - u i sin &alpha; ) 2
According to deriving above, the known anglec of rotation when marginal point vertical coordinate variance obtains minima is horizontal tilt angle, is exactly to σ here2Derivation is α angle when zero at derivative is exactly horizontal tilt angle.
d&sigma; 2 d&alpha; = 2 N &Sigma; i = 1 N ( v i cos &alpha; - u i sin &alpha; ) ( - v i sin &alpha; - u i cos &alpha; ) = 0
Above formula can be obtained following formula through conversion:
tan 2 &alpha; = 2 &Sigma; i = 1 N u i v i &Sigma; i = 1 N ( u i 2 - v i 2 )
So car plate inclination angle in the horizontal direction is:
&alpha; = 1 2 arctan [ 2 &Sigma; i = 1 N u i v i &Sigma; i = 1 N ( u i 2 - v i 2 )
By car plate along horizontal direction turn clockwise α complete car plate horizontal tilt correction.
In license plate image after correcting through horizontal tilt, characters on license plate vertical skew correction is produced interference by car plate upper and lower side frame and left and right side frame, bumper etc., affects the accuracy of vertical skew correction.Therefore must accurately determining the up-and-down boundary of character, the up-and-down boundary of character both decreased interference for vertical skew correction after determining, decreased interference for Character segmentation again.
Sobel vertical operator is used to ask for the vertical edge of bianry image, then vertical edge is carried out the projection in horizontal direction, the white pixel of statistics each row is counted out, if greater than the threshold value set, it is taken as characters on license plate region, if finding first white pixel point quantity statistical value row less than threshold value, then it is assumed that this row is probably coboundary or the lower boundary of character zone.In actual application, often the up-and-down boundary of character is expanded 2~3 pixels, this is done to avoid horizontal tilt correction not exclusively to bring character pixels to lose.
The vertical tilt angle of single character is consistent with the vertical tilt angle of whole car plate, therefore can pass through to calculate the vertical tilt angle of single characters on license plate thus obtaining whole car plate angle of inclination in vertical direction.For single character, when character does not tilt in the vertical direction, after binaryzation, character pixels point projective distribution in vertical direction is the most intensive, and scope is minimum, and homolographic projection point abscissa variance is minimum;When character exists, character pixels point drop shadow spread in vertical direction is relatively wide, and homolographic projection point abscissa variance is bigger.Character surface thereof in the vertical direction more severe, the abscissa variance of subpoint is more big.So upright projection can be done after single character is carried out shear transformation, shearing inclination corresponding during abscissa variance acquirement minima is exactly the angle of inclination of single character.
If character point number is M, character pixels point coordinates is (xi,yi), i=1,2 ... M, after shear transformation, coordinate is transformed to (x 'i,yi), the variance of subpoint abscissa is defined as:
&sigma; 2 = 1 N &Sigma; i = 1 N ( x i &prime; - 1 N &Sigma; k = 1 N x k &prime; ) 2
So can obtain:
&sigma; 2 = 1 N &Sigma; i = 1 N [ ( xi - yi &CenterDot; tan &theta; ) - 1 N &Sigma; k = 1 N ( x k - y k &CenterDot; tan &theta; ) ] 2
= 1 N &Sigma; i = 1 N [ ( x i - 1 N &Sigma; k = 1 N x k ) - ( y i - 1 N &Sigma; k = 1 N y k ) &CenterDot; tan &theta; ] 2
= 1 N &Sigma; i = 1 N [ u i - v i &CenterDot; tan &theta; ] 2
Wherein, u i = x i - 1 N &Sigma; k = 1 N x k , v i = y i - 1 N &Sigma; k = 1 N y k .
Make the abscissa variances sigma of character pixels point projection in vertical direction2Obtain minima, then need to make σ2Derivative to θ is 0, tries to achieve θ ' and is single character angle of inclination in vertical direction.The derivation of equation is as follows:
d&sigma; 2 d&theta; = - 2 sec 2 &theta; 0 N &Sigma; i = 1 N [ u i - v i tan &theta; 0 ] &CenterDot; v i = 0
Because sec2θ0≠ 0, so havingCharacter can be obtained and car plate inclined angle alpha in vertical direction is
&alpha; = &theta; 0 = arctan &Sigma; i = 1 N u i v i &Sigma; i = 1 N v i 2
License plate image has substantially met the requirement of License Plate Character Segmentation through slant correction, next only need to individually be cut out by the character in license plate area.The present invention proposes a kind of partitioning algorithm based on cluster connection and upright projection and completes this step operation.
Character Segmentation of License Plate based on cluster analysis first finds out the connected domain in image, and connected domain is screened by the priori again through car plate, and this algorithm can solve character cutting problems under complex background condition very well.Specific algorithm describes as follows:
(1) license plate image is carried out binary conversion treatment.
(2) by the image after processing by row scanning, if two pel spacings are from d <=dconst, then it is assumed that the two pixel belongs to a class, namely two pixels in a character.Wherein d is defined as:
D (A, B)=| x1-x2|+|y1-y2|
The d of Chinese characterconstThe d of value and English character, numeralconstValue is different.For (nWidth)/7 part d before imageconstTaking 3, do so can solve the problem that the disconnected problem of Chinese character;To (nWidth*6)/7 part d after imageconstTake 2.
(3) what screening obtained is all kinds of, removes the height class less than Height/2, and obtaining class after screening is 7 characters and left and right side frame.
(4) if adhesion problems occurs in character, then the number of class less than 7 or certain class width much larger than the mean breadth of class.Now with vertical projection method, these classes being carried out division process, the middle near zone in class finds upright projection local minizing point thus finding out the boundary point of two characters.
(5) all kinds of original positions according to name placement from left to right.
(6) if the number of fruit is 7, then (7) are forwarded to.Otherwise it is assumed that mistake occurs when segmentation.
(7) if the height of certain class is far longer than all the other 6 classes, it may be possible to the upper and lower rivet of car plate and the reason of characters on license plate adhesion, at this moment it is modified according to the meansigma methods of all the other 6 class height;If the width of certain class is far longer than all the other 6 classes, it may be possible to the reason of the left and right side frame adhesion of the Far Left character of car plate or rightmost character and car plate, at this moment it is modified according to the meansigma methods of all the other 6 class width.
Recognition of License Plate Characters is the one of character recognition, but different with other character recognition (such as print character identification), and characters on license plate has himself feature: character limitednumber;Characters on license plate quality is not so good as print character;Characters on license plate has certain rule, and namely first character is chinese character, and second character is English character, and third and fourth character is English character or numerical character, and remaining character is numerical character.According to these features, the present invention proposes the method in conjunction with thinning and minimum range template matching.Its basic thought be exactly by segmentation after the characters on license plate refinement computing that carries out in binaryzation morphology, so can solve because font style difference brings the shortcoming that discrimination is not high, and the interference of noise can be reduced, improve the discrimination of template matching method to a certain extent.Specifically comprise the following steps that
(1) matching template storehouse is set up, template base comprises the abbreviation of each provinces and cities of China, 26 capitalization English letters, 10 Arabic numerals, the width of the every pictures of template library is 20 pixels, it is highly 40 pixels (it should be noted that the car plate identified in the present invention is only normal domestic car plate, do not include police and military license plate).
(2) characters on license plate is carried out refinement computing so that the stroke width of character becomes a pixel wide.
(3) due to after refining it is possible that isolated noise spot, final matching result can be produced impact by these noise spots, it is therefore necessary to filtered.The thought removing these discrete noise points in the present invention is the black pixel point in scanogram, searches for black pixel point, if the black pixel point found is less than 2 in its 3 × 3 close region, then it is assumed that this point is discrete noise point and is filtered.
(4) characters on license plate after refinement and noise remove is normalized, namely by image scaling, characters on license plate image is become 20 pixel width, the normal pictures that 40 pixels are high.Carrying out image inversion process after normalization, car plate background becomes white, character becomes black,
(5) characters on license plate image and template library are contrasted.Set first characters on license plate and only carry out matching primitives with 32 provinces and cities' abbreviations, second characters on license plate only carries out matching primitives with 26 capitalization English letters, 3rd and the 4th characters on license plate and 10 Arabic numerals also have the mothers of 26 capitalization English to carry out matching primitives, latter two characters on license plate only and 10 Arabic numerals carry out matching primitives, do so not only improves the efficiency of algorithm, moreover it is possible to improve the accuracy rate identified.
(6) scanning car plate character picture, when running into a character pixels, finds nearest character pixels point in the set point of one, the relevant position of template, and calculates the size of minimum distance, and range set in the present invention is the pixel region of 5 × 5.Calculate the minimum range sum of characters on license plate pixel and institute's matching stencil, find out the minimum range sum of car plate and matching stencil.
(7) scan matching template image, when running into a character pixels, finds nearest character pixels point within the scope of one, the relevant position of characters on license plate, and calculates the size of this minimum distance, and range set in the present invention is the pixel region of 5 × 5.Calculate the minimum range sum of matching stencil and characters on license plate, find out the minimum range sum of matching stencil and characters on license plate.
(8) comparing the minimum range sum of (6) and (7), the corresponding templates that gets the small value is as the matching result of characters on license plate.
(9) according to above-mentioned steps, 7 characters on license plate are mated one by one, finally give license board information.
The Method of Automatic Recognition for Character of Lcecse Plate of the present invention, significantly increases the serviceability of whole characters on license plate automatic recognition system.In described License Plate step, the present invention can utilize the feature of license plate area, selects algorithms of different to carry out License Plate, it is ensured that also can be accurately positioned license plate area position when there is interference under different light condition.

Claims (4)

1. a Method of Automatic Recognition for Character of Lcecse Plate, comprises the following steps:
A, input color vehicle image;
B, the colored vehicle image that step a is obtained carry out pretreatment;
In the reasonable situation of c, by day light, colored vehicle image step b obtained by search and the morphologic algorithm of locating license plate of vehicle of mathematics based on color dot is adopted to carry out License Plate;Light is not good by day or in night situation, adopts the colored vehicle image that step b is obtained by the algorithm of locating license plate of vehicle based on gray level image to carry out License Plate;
The character color assuming car plate is A color, and the background color of car plate is B color, comprises the following steps based on the algorithm of locating license plate of vehicle of search color dot pair with mathematical morphology described in step c:
(1) coloured image containing vehicle is carried out gray processing and binary conversion treatment, calculate maximum variance threshold value, obtain corresponding bianry image;
(2) opening up one piece of region of memory in calculator memory, be used for storing binary image data, the length and width of bianry image are equal with the length and width of coloured image, and the value of each pixel is initialized as 255;
(3) the A colour vegetarian refreshments in scanning bianry image, if finding B colour vegetarian refreshments on the left of coloured image relevant position, then think that this A colour vegetarian refreshments is the start boundary point of characters on license plate and car plate background color, i.e. the starting pixels point of characters on license plate, the position of this point of labelling;
(4) the A colour vegetarian refreshments of bianry image is continued to scan on, if find B colour vegetarian refreshments on the right side of coloured image relevant position, then think that this A colour vegetarian refreshments is the termination boundary point of characters on license plate and car plate background color, i.e. the position of this point of the termination pixel of characters on license plate, and labelling;
(5) if the termination pixel phase difference of the starting pixels point of characters on license plate and characters on license plate is within 50 pixels, then think that this block region is characters on license plate pixel region, and with these points of black pixel point labelling in the image of step (three);
(6) complete scan entire image, until finding out all A normal complexion B color color dot pair in image;
(7) use two-value opening operation to process the color dot that step (6) is obtained to process;
(8) use etching operation that two-value opening operation is processed later color to processing, expand the scope of color dot pair further;
(9) using expansive working to color dot to processing, obtain continuous sheet of pixel region, this block region is exactly car plate candidate regions;
Described in step c, the algorithm of locating license plate of vehicle based on gray level image comprises the following steps:
A1, first the coloured image containing vehicle is carried out gray processing and binary conversion treatment;
B1, the method adopting every fourfold interlacing a line, the line number r that labelling monochrome pixels point change frequency is maximumm, and write down change frequency m;
C1, with rmBased on, statistically lower 3 row, it is judged that its monochrome pixels point change frequency whether with rmThe change frequency of row is close, and the scope of the change frequency of the monochrome pixels point of license plate area is from 0.75m to 1.25m, and namely in car plate, the number of times of black and white change is within a stability range, but not the monochrome pixels change frequency of license plate area is unstable;
D1, repetition step B1 and step C1, obtain the up-and-down boundary of car plate, so that it is determined that car plate candidate regions;
D, the car plate respectively step c location obtained carry out horizontal tilt rectification and vertical tilt is corrected, wherein, the horizontal tilt rectification of car plate and vertical tilt are corrected and are respectively adopted the horizontal tilt correction method minimum based on car plate marginal point vertical coordinate variance and the car plate entirety vertical skew correction method based on single character vertical tilt angle carries out;
The car plate that step d is obtained by e, employing based on the method clustering connection and upright projection carries out Character segmentation;The described method based on cluster connection and upright projection first finds out the connected domain in image, and connected domain is screened by the priori again through car plate;
Step e is obtained character and carries out character recognition by the template matching method that f, use improve;
Wherein, the template matching method of improvement comprises the following steps:
(1) matching template storehouse is set up;
(2) characters on license plate is carried out refinement computing so that the stroke width of character is a pixel wide;
(3) characters on license plate that step (2) is obtained filters discrete noise point;
(4) being normalized by the characters on license plate after refining and filtering discrete noise point, carry out image inversion process after normalized, car plate background becomes white, character becomes black;
(5) characters on license plate image step (4) obtained and matching template storehouse contrast, and obtain matching template;
(6) scanning car plate character picture, when running into a character pixels, nearest character pixels point is found within the scope of the pixel region of matching template 5 × 5, and calculate the size of nearest character pixels point and matching template minimum distance, calculate the minimum range sum of characters on license plate pixel and matching stencil, find out the minimum range sum of characters on license plate and matching template;
(7) scan matching template image, when running into a character pixels, nearest character pixels point is found within the scope of the pixel region of characters on license plate 5 × 5, and calculate the size of nearest character pixels point and characters on license plate minimum distance, calculate the minimum range sum of matching stencil and characters on license plate, find out the minimum range sum of matching stencil and characters on license plate;
(8) comparing the minimum range sum of (6) and (7), the corresponding templates that gets the small value is as the matching result of characters on license plate;
(9) according to above-mentioned steps, characters on license plate is mated one by one, finally give license board information;
G, output step f recognition result.
2. Method of Automatic Recognition for Character of Lcecse Plate as claimed in claim 1, it is characterised in that pretreatment described in step b includes image smoothing method and/or filtering and noise reduction method.
3. Method of Automatic Recognition for Character of Lcecse Plate as claimed in claim 1, it is characterized in that, described in step c, utilize car plate background color and characters on license plate color difference in gray scale to find out car plate region based on the algorithm of locating license plate of vehicle of search color dot pair with mathematical morphology.
4. Method of Automatic Recognition for Character of Lcecse Plate as claimed in claim 1, it is characterised in that comprise the following steps based on the method for cluster connection and upright projection described in step e:
(1) license plate image is carried out binary conversion treatment;
(2) by the image after processing by row scanning, if two pel spacings are from d <=dconst, then it is assumed that the two pixel belongs to a class, namely two pixels in a character;
(3) what screening obtained is all kinds of, removes the height class less than Height/2, and obtaining class after screening is 7 characters and left and right side frame;
(4) all kinds of original positions according to name placement from left to right.
CN201310028106.8A 2013-01-24 2013-01-24 A kind of Method of Automatic Recognition for Character of Lcecse Plate Expired - Fee Related CN103116751B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310028106.8A CN103116751B (en) 2013-01-24 2013-01-24 A kind of Method of Automatic Recognition for Character of Lcecse Plate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310028106.8A CN103116751B (en) 2013-01-24 2013-01-24 A kind of Method of Automatic Recognition for Character of Lcecse Plate

Publications (2)

Publication Number Publication Date
CN103116751A CN103116751A (en) 2013-05-22
CN103116751B true CN103116751B (en) 2016-07-06

Family

ID=48415123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310028106.8A Expired - Fee Related CN103116751B (en) 2013-01-24 2013-01-24 A kind of Method of Automatic Recognition for Character of Lcecse Plate

Country Status (1)

Country Link
CN (1) CN103116751B (en)

Families Citing this family (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103886320A (en) * 2014-01-10 2014-06-25 北京环境特性研究所 Label automatic recognition method based on parallel support vector machine weighting
CN103824078B (en) * 2014-03-18 2017-10-10 厦门翼歌软件科技有限公司 The many license plate locating methods of complex scene
CN104102909B (en) * 2014-07-23 2017-03-15 中科联合自动化科技无锡有限公司 Vehicle characteristics positioning and matching process based on lenticular information
CN104399674A (en) * 2014-09-11 2015-03-11 上海大学 Smoke box brand visual inspection sorting system
CN105631445A (en) * 2014-11-06 2016-06-01 通号通信信息集团有限公司 Character recognition method and system for license plate with Chinese characters
CN104463195B (en) * 2014-11-08 2018-08-07 沈阳工业大学 Printing digit recognizing method based on template matches
CN105719488B (en) * 2014-12-02 2019-04-12 杭州海康威视数字技术股份有限公司 The recognition methods of license plate, device and the video camera for Car license recognition, system
CN104463134B (en) * 2014-12-19 2019-02-12 深圳市捷顺科技实业股份有限公司 A kind of detection method of license plate and system
CN104636309B (en) * 2015-02-06 2018-01-05 南京理工大学 Matrix recognition methods based on machine vision
CN105989345A (en) * 2015-02-28 2016-10-05 华为技术有限公司 Method and device for discovering friends by image matching
CN104866849A (en) * 2015-04-30 2015-08-26 天津大学 Food nutrition label identification method based on mobile terminal
CN105279512B (en) * 2015-10-22 2018-07-10 东方网力科技股份有限公司 A kind of inclination licence plate recognition method and device
CN105447831B (en) * 2015-12-14 2019-02-15 浙江宇视科技有限公司 License plate image processing method and processing device
CN106127206B (en) * 2016-06-28 2019-04-05 北京智芯原动科技有限公司 A kind of vertical angles detection method and device of license plate
CN106485234A (en) * 2016-10-21 2017-03-08 合肥哦走信息技术有限公司 One kind is based on vehicle identification method in intelligent transportation system
CN106650732B (en) * 2016-12-27 2020-04-28 深圳市捷顺科技实业股份有限公司 License plate recognition method and device
CN106951896B (en) * 2017-02-22 2020-01-03 武汉黄丫智能科技发展有限公司 License plate image tilt correction method
CN108985137B (en) * 2017-06-02 2021-08-27 杭州海康威视数字技术股份有限公司 License plate recognition method, device and system
CN108596172A (en) * 2018-04-11 2018-09-28 航天科技控股集团股份有限公司 A kind of the vehicle binding device and method of car networking client
CN108830274A (en) * 2018-05-03 2018-11-16 南京邮电大学 Characters on license plate detects positioning and recognition methods automatically under a kind of complex background environment
CN108968991B (en) * 2018-05-08 2022-10-11 平安科技(深圳)有限公司 Hand bone X-ray film bone age assessment method, device, computer equipment and storage medium
CN108830314B (en) * 2018-06-06 2020-12-15 西安纸贵互联网科技有限公司 Semi-quantitative identification method and device for in-vitro diagnostic reagent
CN109100370A (en) * 2018-06-26 2018-12-28 武汉科技大学 A kind of pcb board defect inspection method based on sciagraphy and connected domain analysis
CN109145915B (en) * 2018-07-27 2021-08-06 武汉科技大学 Rapid distortion correction method for license plate under complex scene
CN109241973B (en) * 2018-08-21 2022-02-08 南京工程学院 Full-automatic soft segmentation method for characters under texture background
CN109460701B (en) * 2018-09-10 2020-09-25 昆明理工大学 Font identification method based on longitudinal and transverse histograms
CN110020655B (en) * 2019-04-19 2021-08-20 厦门商集网络科技有限责任公司 Character denoising method and terminal based on binarization
CN110443244B (en) * 2019-08-12 2023-12-05 深圳市捷顺科技实业股份有限公司 Graphics processing method and related device
CN110826569B (en) * 2019-11-05 2022-07-19 泰康保险集团股份有限公司 Bill image preprocessing method, device, medium and electronic equipment
CN111046872B (en) * 2019-12-12 2023-10-24 深圳市杰恩世智能科技有限公司 Optical character recognition method
CN111401364B (en) * 2020-03-18 2023-07-25 深圳市市政设计研究院有限公司 License plate positioning algorithm based on combination of color features and template matching
CN111553317B (en) * 2020-05-14 2023-08-08 北京惠朗时代科技有限公司 Anti-fake code acquisition method and device, computer equipment and storage medium
CN112016565B (en) * 2020-10-27 2021-06-04 恒银金融科技股份有限公司 Segmentation method for fuzzy numbers at account number of financial bill

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007011654A (en) * 2005-06-30 2007-01-18 Seiko Epson Corp Method of reading embossed character
CN101398894A (en) * 2008-06-17 2009-04-01 浙江师范大学 Automobile license plate automatic recognition method and implementing device thereof
CN101833859A (en) * 2010-05-14 2010-09-15 山东大学 Self-triggering license plate identification method based on virtual coil
CN102254152A (en) * 2011-06-17 2011-11-23 东南大学 License plate location method based on color change points and color density
CN102385753A (en) * 2011-11-17 2012-03-21 江苏大学 Illumination-classification-based adaptive image segmentation method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007011654A (en) * 2005-06-30 2007-01-18 Seiko Epson Corp Method of reading embossed character
CN101398894A (en) * 2008-06-17 2009-04-01 浙江师范大学 Automobile license plate automatic recognition method and implementing device thereof
CN101833859A (en) * 2010-05-14 2010-09-15 山东大学 Self-triggering license plate identification method based on virtual coil
CN102254152A (en) * 2011-06-17 2011-11-23 东南大学 License plate location method based on color change points and color density
CN102385753A (en) * 2011-11-17 2012-03-21 江苏大学 Illumination-classification-based adaptive image segmentation method

Also Published As

Publication number Publication date
CN103116751A (en) 2013-05-22

Similar Documents

Publication Publication Date Title
CN103116751B (en) A kind of Method of Automatic Recognition for Character of Lcecse Plate
CN102708356B (en) Automatic license plate positioning and recognition method based on complex background
CN103824066B (en) A kind of licence plate recognition method based on video flowing
Gong et al. The recognition and tracking of traffic lights based on color segmentation and camshift for intelligent vehicles
CN100414561C (en) Vehicle plate extracting method based on skiagraphy and mathematical morphology
CN104036262B (en) A kind of method and system of LPR car plates screening identification
CN101872416B (en) Vehicle license plate recognition method and system of road image
CN101334836B (en) License plate positioning method incorporating color, size and texture characteristic
CN106650553A (en) License plate recognition method and system
CN103198315B (en) Based on the Character Segmentation of License Plate of character outline and template matches
CN111563412B (en) Rapid lane line detection method based on parameter space voting and Bessel fitting
CN105893949A (en) Lane line detection method under complex road condition scene
CN104050450A (en) Vehicle license plate recognition method based on video
CN103077384A (en) Method and system for positioning and recognizing vehicle logo
CN107122777A (en) A kind of vehicle analysis system and analysis method based on video file
CN104751142A (en) Natural scene text detection algorithm based on stroke features
CN103136528B (en) A kind of licence plate recognition method based on dual edge detection
Li et al. Nighttime lane markings recognition based on Canny detection and Hough transform
CN110619327A (en) Real-time license plate recognition method based on deep learning in complex scene
CN105488492B (en) A kind of color image preprocess method, roads recognition method and relevant apparatus
CN109800752B (en) Automobile license plate character segmentation and recognition algorithm based on machine vision
CN103530608A (en) Vehicle type judgment method and vehicle type judgment device
CN103903018A (en) Method and system for positioning license plate in complex scene
CN109190483B (en) Lane line detection method based on vision
CN103971128A (en) Traffic sign recognition method for driverless car

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160706

Termination date: 20190124

CF01 Termination of patent right due to non-payment of annual fee