CN109800752B - Automobile license plate character segmentation and recognition algorithm based on machine vision - Google Patents

Automobile license plate character segmentation and recognition algorithm based on machine vision Download PDF

Info

Publication number
CN109800752B
CN109800752B CN201810899477.6A CN201810899477A CN109800752B CN 109800752 B CN109800752 B CN 109800752B CN 201810899477 A CN201810899477 A CN 201810899477A CN 109800752 B CN109800752 B CN 109800752B
Authority
CN
China
Prior art keywords
license plate
image
character
img
automobile
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.)
Active
Application number
CN201810899477.6A
Other languages
Chinese (zh)
Other versions
CN109800752A (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.)
Liaoning University of Technology
Original Assignee
Liaoning University of Technology
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 Liaoning University of Technology filed Critical Liaoning University of Technology
Priority to CN201810899477.6A priority Critical patent/CN109800752B/en
Publication of CN109800752A publication Critical patent/CN109800752A/en
Application granted granted Critical
Publication of CN109800752B publication Critical patent/CN109800752B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a machine vision-based automobile license plate character segmentation and recognition algorithm, which comprises the following steps: the method comprises the following steps of firstly, collecting an automobile image sample containing a license plate by using electronic equipment; sequentially carrying out pixel point compression, color image graying, gray level stretching, filtering and binaryzation on the collected license plate image sample to obtain a preprocessed automobile image containing the license plate; performing marginalization processing on the preprocessed automobile image containing the license plate, and positioning a license plate area of a target automobile image to obtain a license plate image; fourthly, performing character segmentation on the license plate image; and fifthly, carrying out normalization processing on the single character binary image after the license plate character is segmented, traversing a standard license plate character template library, calculating the Euclidean distance between the segmented single character image and the standard character, and finally identifying the license plate number.

Description

Automobile license plate character segmentation and recognition algorithm based on machine vision
Technical Field
The invention relates to the field of intelligent automobile electronic engineering algorithm research, and particularly discloses an automatic automobile license plate character segmentation recognition method based on machine vision.
Background
With the rapid development of automobile manufacturing industry, automobiles gradually become important transportation tools for short-distance family trips, but with the problem of urban road traffic safety, the construction of intelligent traffic is necessary and necessary to realize the sustainable development of cities. The technology of recognizing license plates of automobiles is being paid attention to and researched by more and more people as an important ring in intelligent traffic systems. The vehicle license plate recognition technology can be applied to license plate positioning recognition systems in traditional occasions such as exit gate management of expressway toll stations, entrance and exit registration management of small and medium-sized parking lots in communities, school parking lot management and the like, and has the characteristics of high operation reliability, accurate recognition and the like. With the rapid development of machine vision and artificial intelligence, the automobile license plate recognition technology is becoming a key research method in the fields of Advanced Driving Assistance (ADAS) such as automobile forward anti-collision early warning, automobile lane departure detection and the like, automobile unmanned driving and the like.
Disclosure of Invention
The invention designs and develops an automatic automobile license plate character segmentation and identification method based on machine vision, which is used for carrying out fixed boundary multi-threshold license plate character segmentation and license plate fixed characteristic screening on the basis of projection analysis to finally obtain correctly identified license plate characters and numbers, and has high reliability and accurate identification.
The technical scheme provided by the invention is as follows:
a vehicle license plate character segmentation and recognition algorithm based on machine vision comprises the following steps:
the method comprises the following steps of firstly, collecting an automobile image sample containing a license plate by using electronic equipment;
sequentially carrying out pixel point compression, color image graying, gray level stretching, filtering and binaryzation on the collected license plate image sample to obtain a preprocessed automobile image containing the license plate;
performing marginalization processing on the preprocessed automobile image containing the license plate, and positioning a license plate area of a target automobile image to obtain a license plate image;
fourthly, performing character segmentation on the license plate image;
and fifthly, performing row normalization processing on the single character binary image after the license plate character is segmented, traversing a standard license plate character template library, calculating the Euclidean distance between the segmented single character image and the standard character, and finally identifying the license plate number.
Preferably, the image compression ratio of the pixel point compression process in the second step is:
Figure GDA0002020730270000021
wherein R isimgThe image compression rate is delta, the threshold pixel height is delta, and the pixel height of the automobile image sample containing the license plate is h.
Preferably, the image binarization process in the second step includes:
2/3 size of the gray value range of the image pixel point is selected, and the binarization optimal threshold value is obtained by adopting the following formula:
Figure GDA0002020730270000022
wherein, VmaxIs the maximum value of gray value of image pixel point, VminIs the minimum value of gray value of image pixel point, VbestIs the best threshold value for binarization.
Preferably, the license plate image locating process in the third step includes:
step a, adopting a rectangular template with the pixel size of mxn, performing expansion operation on the preprocessed image IMG1, filling holes, communicating license plate areas, then corroding by using the rectangular template with the same size, eliminating isolated small areas, reserving large communicated areas, and finally obtaining a processed target image IMG 2;
b, performing open operation on the target image IMG2, performing corrosion operation on the target image by adopting a rectangular template with the size of m multiplied by n, further eliminating a small noise area of a non-license plate area, and then expanding the small noise area by using the template with the same size to obtain a target image IMG3 with most background noise eliminated;
c, performing matrix template opening operation on the target image IMG3 in the size of m multiplied by n to obtain a binary target image IMG4 which basically only has a license plate area, and preliminarily positioning the license plate;
and d, performing open operation on the target image IMG4 by taking a circular template with the radius of r, and further eliminating background small noise interference to obtain a target image IMG5 positioned in the license plate area.
Preferably, the license plate image character segmentation process in the fourth step includes:
step A, performing license plate region inclination correction and interval character elimination processing on the target image positioned in the license plate region to obtain a character segmentation preprocessing image;
b, projecting the character segmentation preprocessing image in the horizontal direction to obtain a horizontal histogram, calculating optimal thresholds of a segmentation character region and a non-character region, traversing pixel points in the horizontal direction, comparing the horizontal histogram of the pixel points with the optimal thresholds, and judging the pixel points to be character region pixel points if the horizontal histogram is larger than the optimal thresholds;
step C, recording pixel positions of all character areas to create a rising point array, and recording pixel positions of non-character areas to create a valley point array;
calculating the position of each descending point according to the valley point array, traversing from the first pixel point to the last descending point in the horizontal direction, and recording the coordinate position of the character point if the pixel point is not white so as to obtain an upper frame area;
calculating the position of each rising point according to the rising point array, traversing from the x-axis license plate end point to the last rising point, and recording the coordinate position of an upper character point if the pixel point is not white so as to obtain a lower frame area;
d, calculating the height of the license plate characters, performing vertical projection on the character segmentation preprocessing image to obtain a vertical histogram, and calculating to obtain the horizontal distance between the characters on the license plate;
step E, searching the maximum character height in the character height array, searching the maximum value in the horizontal spacing array between the characters and taking the maximum value as a character segmentation threshold value, and finally obtaining the 7 character segmentation images IMG on the license plates1…IMGs7。
Preferably, the license plate region tilt correction angle in step a is:
α=|90°-θ|
wherein, theta is the actual inclination angle of the license plate.
Preferably, the space character elimination process includes:
and performing open operation on the target image after the inclination correction, performing corrosion operation on the target image after the inclination correction by adopting a circular template with the radius of r, and then expanding the target image by using the circular template with the radius of r to obtain the target image without the interval mark points.
Preferably, the horizontal histogram calculation formula is:
Figure GDA0002020730270000031
wherein, IMG _ Histrow(i) Distributing histograms of white pixel points in the horizontal direction of a target image, wherein MAXH is the number of pixel point rows with upper and lower edges and upper and lower frames, and H (i) is the number of white pixel points in the ith row of the license plate image;
the optimal threshold calculation formula of the character segmentation area and the non-character segmentation area is as follows:
Figure GDA0002020730270000041
wherein, Ave _ IMG _ HistrowMIN _ IMG _ Hist being the mean value of the horizontal direction histogramrowIs the minimum value of the horizontal direction histogram, Mean _ IMG _ HistrowIs the optimal threshold for dividing character areas and non-character areas.
Preferably, the calculation formula of the maximum height of the license plate characters is as follows:
Figure GDA0002020730270000042
wherein MIN _ Char _ HightrowPeak _ Arr as maximum character heightrow(i) For horizontal ith Peak width, Peak _ Arrrow(i)=Peak_Dis_Arrrow(i)-Bottom_Arrrow(i);Peak_Dis_Arrrow(i) The horizontal center distance of the ith pixel point is; peak _ Dis _ Arrrow(i)=Rise_Arrrow(i)+Bottom_Arrrow(i);Rise_Arrrow(i) To the horizontal ith ascending point position, Bottom _ Arrrow(i) Is the position of the horizontal ith valley bottom point;
the calculation formula of the center distance of the license plate characters is as follows:
Peak_Dis_Arrcol(i)=Rise_Arrcol(i)+Bottom_Arrcol(i)
wherein, Peak _ Dis _ Arrcol(i) Rise _ Arr, the distance between centers of vertical characterscol(i) At the ith vertical rise point position, Bottom _ Arrcol(i) Is the valley bottom position of the vertical ith pixel point.
Preferably, the step five includes:
step I, IMG for the target character images1…IMGs7, carrying out normalization processing to ensure that the size of each character image is equal;
step II, creating a standard license plate character image library, wherein 34 provinces are abbreviated as Chinese characters, letters A-Z and numbers 0-9;
step III, traversing a standard license plate character image library, and aiming at a target character image IMGs1 corresponds to a certain pixel point a (x)a,ya) And a pixel point b (x) corresponding to each character image in the standard license plate character image libraryb,yb) And calculating the Euclidean distance between the two corresponding points:
Figure GDA0002020730270000051
wherein d (a, b) is the Euclidean distance between the two corresponding points;
further, an object character image IMG is obtaineds1, storing the sum of Euclidean distances between the total pixels of the array and corresponding points of each character image in a standard license plate character image library to an array IMG _ Dis _ Arr;
step IV, traversing the array IMG _ Dis _ Arr to find the minimum Euclidean distance, wherein the image in the corresponding standard license plate character image library is the recognized character;
step V, traversing IMG of target character images2…IMGsAnd 7, repeating the step III and the step IV until other residual license plate characters are identified.
The invention has the advantages of
The invention provides a method for segmenting and automatically identifying characters of a vehicle license plate based on machine vision. Aiming at various types of standard license plates of motor vehicles used in China, a high-definition camera is used for collecting images of the front part of a running automobile, the original automobile images are subjected to image preprocessing and edge detection to obtain binary automobile images containing license plate outlines, then the automobile license plates are positioned and segmented based on a mathematical morphology model to extract ROI target images of regions of interest, the ROI images are subjected to preprocessing such as inclination correction and license plate interval symbol elimination, fixed boundary multi-threshold license plate character segmentation and license plate fixed feature screening are performed on the basis of projection analysis, and finally license plate characters and numbers which are correctly identified are obtained.
Drawings
FIG. 1 is a block diagram of the general architecture of the machine vision-based automobile license plate character segmentation recognition algorithm.
FIG. 2 is a flow chart of the automobile license plate character segmentation algorithm of the present invention.
Fig. 3 is a flow chart of license plate region location according to the present invention.
Fig. 4 is a flow chart of license plate number identification according to the present invention.
FIG. 5 is a horizontal projection of a license plate according to the present invention.
Detailed Description
The present invention is further described in detail below with reference to the attached drawings so that those skilled in the art can implement the invention by referring to the description text.
As shown in fig. 1, the vehicle license plate character segmentation and recognition algorithm based on machine vision provided by the invention comprises:
step S110, collecting an automobile image sample containing a license plate by using electronic equipment, and adopting a high-resolution color camera as a preferred automobile front image;
step S120, sequentially performing pixel point compression, color image graying, gray stretching, filtering and binaryzation on the collected license plate image sample to obtain a preprocessed automobile image containing the license plate;
the original image data collected by the high-resolution camera is too large, so that the image size compression is performed in order to facilitate the operation execution on an embedded system, and the image compression ratio is as follows:
Figure GDA0002020730270000061
wherein R isimgIn the embodiment, δ is 200, and when the height exceeds 200 pixels, the compression is performed.
The image binarization adopts an image gray value three-division point threshold method, and the optimal threshold value of the binarization is obtained according to the following formula:
Figure GDA0002020730270000062
in the formula, VmaxIs the maximum value of gray value of image pixel point, VminAnd taking 2/3 size of the gray value range of the image pixel points as the optimal threshold value for binarization, wherein the gray value is the minimum value of the gray value of the image pixel points.
Step S130, performing marginalization processing on the preprocessed automobile image containing the license plate;
as shown in fig. 3, step S140 locates a license plate region of the target vehicle image to obtain a license plate image;
s141, performing closed operation on the target image IMG1 subjected to edge detection, performing expansion operation on the image by adopting a rectangular template with the size of m multiplied by n, filling holes, communicating license plate areas, then corroding by using the rectangular template with the same size, eliminating isolated small areas, reserving large communicated areas, and finally obtaining a processed target image IMG 2;
s142, performing open operation on the target image IMG2, performing corrosion operation on the target image by adopting a rectangular template with the size of m multiplied by n, further eliminating a small noise area of a non-license plate area, and then expanding the small noise area by using the template with the same size to obtain a target image IMG3 with most background noise eliminated;
and S143, performing matrix template opening operation on the image IMG3 obtained in the last step in the size of m multiplied by n to obtain a binaryzation target image IMG4 which basically only has a license plate area, and preliminarily positioning the license plate.
Step S144, performing an opening operation on the IMG4 by taking a circular template with radius r, further eliminating the interference of the background small noise, and obtaining a target image IMG5 located in the license plate region, i.e. the ROI region, as an optimization, in this embodiment, the size of the matrix template mxn is 9 × 9, and the size of the circular template r is 3.
Step 150, preprocessing the target image such as license plate region inclination correction and interval character elimination; the method comprises the following steps:
and step 151, correcting the inclination of the license plate region, wherein the target image IMG5 of the license plate region, namely the ROI region, has the inclination of an angle under the actual working condition of the automobile driving process, so that the angle needs to be corrected. For the projection of the image two-dimensional function g (x, y) on the x-axis:
Figure GDA0002020730270000071
in the formula, a is x · cos θ + y · sin θ, b is x · sin θ + y · cos θ, θ is an actual inclination angle of the license plate, and under an actual working condition, the maximum inclination angle of the license plate region generally does not exceed 90 °, and after determining θ through edge detection, the license plate region is subjected to |90 ° - θ | rotation correction to obtain a target image IMG 6;
step S152, a space punctuation similar to a solid period is arranged between the No. 2 and No. 3 characters on the domestic standard automobile license plate, and the space punctuation is easily judged as a character by mistake in the character segmentation link, so that the character is segmented by mistake, and the space characters are eliminated before the character segmentation is carried out. The method comprises the following steps:
firstly, performing open operation on an object image IMG6, and performing corrosion operation on the object image by adopting a circular template with the radius of r to eliminate a small noise area of a spacer area;
the same size template is then expanded to obtain the target image IMG7 with the spacer dots removed, in this embodiment a circular template r is chosen to be 3.
As shown in fig. 2, step S160, performing projection analysis and multi-threshold license plate character segmentation on the target image obtained after the preprocessing in step S152:
as shown in fig. 5, in step S161, performing projection analysis on the target image to obtain a histogram, and calculating to obtain the maximum height of the characters on the license plate;
aiming at horizontal projection, the specific process is as follows:
according to the histogram formula:
Figure GDA0002020730270000072
in the formula, MAXH refers to the upper and lower edges of the license plate, including the number of lines of pixel points between characters and frames, IMG _ HistrowDistributing histograms of white pixel points of the target image in the horizontal direction; h (i) is the number of white pixel points in the ith row of the license plate image.
Calculating the optimal threshold value for dividing the character area and the non-character area according to the histogram average value and the minimum value:
taking the mean of the histogram:
Figure GDA0002020730270000081
then take the minimum of the histogram:
Figure GDA0002020730270000082
obtaining an optimal threshold value for segmenting the character area and the non-character area:
Figure GDA0002020730270000083
traversing the x axis, and comparing the histogram IMG _ Hist of the ith pixel pointrow(i) And the optimal threshold Mean _ IMG _ HistrowIf the size of the character area is larger than the optimal threshold value, the character area is determined to be the ith rising point, and an array Rise _ Arr is createdrow(i) Recording the position of the point; if the value is less than or equal to the optimal threshold value, the non-character area is judged as the valley point, and an array Bottom _ Arr is createdrow(i) The ith valley width was recorded.
Step S162, calculating the center distance of characters:
for array Rise _ Arrrow(i) Subtracting the position of the ith ascending point from the position of the ith +1 th ascending point to obtain the center distance Peak _ Dis _ Arr of the ith Peakrow(i) Wherein, the peak center distance is one peak width + one valley bottom width.
And calculating the position of the falling point and the height of the character, namely parameters such as valley bottom width and the like. According to the following:
Down_Arrrow(i)=Rise_Arrrow(i+1)-Bottom_Arrrow(i)
i.e., the position of the ith descending point Down _ Arrrow(i) Equal to the position of the (i + 1) th rising point minus the width of the (i) th valley bottom;
according to the following: peak _ Arrrow(i)=Peak_Dis_Arrrow(i)-Bottom_Arrrow(i)
I.e., the ith Peak width Peak _ Arrrow(i) Equal to the center distance of the ith peak minus the width of the ith valley;
and calculating the maximum height of the license plate characters, and calculating the positions of the upper frame and the lower frame. For the character height (Peak width) array Peak _ Arrrow(i) According to the following:
Figure GDA0002020730270000091
calculating the maximum character height MIN _ Char _ Hightrow
Remove upper and lower frame to target image license plate region, upper and lower frame position detection includes:
for histogram IMG_HistrowTraversing from 1 st pixel point to 1 st descending point Down _ Arrrow(1) When the point is not white, the point is determined as a gap point between the upper frame and the 1 st character, the coordinate position of the character point is recorded, and the character point is stored in the array Edge _ TxAnd Edge _ TyThereby determining the upper border area. Similarly, detecting the bottom Edge, scanning from the bottom Edge of the license plate to the starting position of the last character, namely traversing from the license plate end point MAXH to the last ascending point, if the point is not white, determining the gap point between the lower frame and the last character, recording the coordinate position of the last character, and storing the coordinate position in the array Edge _ BxAnd Edge _ ByAnd (5) determining a lower frame area.
Step S163, performing vertical projection on the target image to obtain a histogram, and performing vertical projection analysis on the target image IMG7, wherein the steps are the same as those of horizontal projection analysis;
step S164, calculating to obtain the maximum horizontal distance between characters on the license plate, and after performing vertical projection analysis on the target image IMG7, obtaining a histogram Peak which is the center distance array Peak _ Dis _ Arr between the characterscol(i) And obtaining the maximum center distance between the characters.
And S165, screening character segmentation areas by license plate fixing characteristics, and completing character segmentation based on a multi-threshold method. The multi-threshold character segmentation is realized by the prior knowledge of automobile license plate characters, and the number of characters on the license plate is 7, namely the center distance MAX { Peak _ Dis _ Arr between the 2 nd character and the 3 rd charactercol(i) }; and defining the center distance in the array Peak _ Dis _ Arrcol(i) The Index value in (1) is Index;
step S166, continue at Peak _ Dis _ Arrcol(i) Finding the maximum value in the image data and taking the maximum value as the distance selected by the character segmentation threshold value to finally obtain the 7 character segmentation image IMG on the license plates1…IMGs7。
As shown in fig. 4, in step S170, a binarization image line normalization process is performed on the single segmented character of the license plate character, then a standard license plate character template library is traversed, an euclidean distance between the segmented single character image and the standard character is calculated, and finally the license plate number is identified.
Character recognition method, namely, aiming at single character binary image IMG after license plate character segmentations1…IMGs7, carrying out normalization processing, traversing a standard license plate character template library, and calculating the IMG (inertial measurement group) of the segmented single character images1…IMGs7 euclidean distance from the standard character and finally identifying the license plate number. Further:
step S171, IMG for target character images1…IMGs7, carrying out normalization processing to ensure that the size of each character image is equal;
step S172, creating a standard license plate character image library, wherein 34 provinces are abbreviated as Chinese characters, letters A-Z and numbers 0-9;
step S173, traversing the standard license plate character image library and aiming at the target character image IMGs1 corresponds to a certain pixel point a (x)a,ya) And a pixel point b (x) corresponding to each character image in the standard license plate character image libraryb,yb) According to the formula:
Figure GDA0002020730270000101
step S174 calculates Euclidean distance d between two corresponding points(a,b)Further, the Euclidean distance sum of the total pixels of the target character images IMGs1 and the corresponding points of each character image in the standard license plate character image library is calculated and stored into an array IMG _ Dis _ Arr;
step S175, traversing the array IMG _ Dis _ Arr to find the minimum Euclidean distance, wherein the image in the corresponding standard license plate character image library is the recognized character;
traversing target character image IMGs2…IMGsAnd 7, repeating the third step and the fourth step until other residual license plate characters are identified.
Experimental example: 200 license plates are randomly selected, 196 license plate characters are accurately recognized by the aid of the vision-based automobile license plate character segmentation recognition algorithm, the effective rate reaches 98%, 20 license plate parts in 200 selected license plate images are greatly influenced by sludge, and a certain character or a plurality of character parts are shielded.
The invention provides a method for segmenting and automatically identifying characters of a vehicle license plate based on machine vision. Aiming at various types of standard license plates of motor vehicles used in China, a high-definition camera is used for collecting images of the front part of a running automobile, an original automobile image is firstly subjected to image preprocessing and edge detection to obtain a binary automobile image containing a license plate outline, then the positioning and segmentation of the automobile license plate are carried out on the basis of a mathematical morphology model to extract an ROI target image in an interested area, the ROI image is subjected to further preprocessing such as inclination correction and license plate interval character elimination, and then fixed boundary multi-threshold license plate character segmentation and license plate fixed characteristic screening are carried out on the basis of projection analysis to finally obtain correctly identified license plate characters and numbers, the identification is accurate and the reliability is high, although the implementation scheme of the invention is disclosed above, the invention is not only limited to the applications listed in the specification and the implementation mode, and the invention can be completely applied to various fields suitable for the invention, additional modifications will readily occur to those skilled in the art, and the invention is therefore not limited to the specific details and illustrations shown and described herein, without departing from the general concept defined by the claims and their equivalents.

Claims (6)

1. A vehicle license plate character segmentation and recognition algorithm based on machine vision is characterized by comprising the following steps:
the method comprises the following steps of firstly, collecting an automobile image sample containing a license plate by using electronic equipment;
sequentially carrying out pixel point compression, color image graying, gray level stretching, filtering and binaryzation on the collected license plate image sample to obtain a preprocessed automobile image containing the license plate;
performing marginalization processing on the preprocessed automobile image containing the license plate, and positioning a license plate area of a target automobile image to obtain a license plate image;
fourthly, performing character segmentation on the license plate image;
step five, carrying out normalization processing on a single character binary image after license plate character segmentation, then traversing a standard license plate character template library, calculating the Euclidean distance between the segmented single character image and a standard character, and finally identifying a license plate number;
the license plate image character segmentation process of the fourth step comprises the following steps:
step A, performing license plate region inclination correction and interval character elimination processing on the target image positioned in the license plate region to obtain a character segmentation preprocessing image;
b, projecting the character segmentation preprocessing image in the horizontal direction to obtain a horizontal histogram, calculating optimal thresholds of a segmentation character region and a non-character region, traversing pixel points in the horizontal direction, comparing the horizontal histogram of the pixel points with the optimal thresholds, and judging the pixel points to be character region pixel points if the horizontal histogram is larger than the optimal thresholds;
step C, recording pixel positions of all character areas to create a rising point array, and recording pixel positions of non-character areas to create a valley point array;
calculating the position of each descending point according to the valley point array, traversing from the first pixel point to the last descending point in the horizontal direction, and recording the coordinate position of the character point if the pixel point is not white so as to obtain an upper frame area;
calculating the position of each rising point according to the rising point array, traversing from the x-axis license plate end point to the last rising point, and recording the coordinate position of an upper character point if the pixel point is not white so as to obtain a lower frame area;
d, calculating the height of the license plate characters, performing vertical projection on the character segmentation preprocessing image to obtain a vertical histogram, and calculating to obtain the horizontal distance between the characters on the license plate;
step E, searching the maximum character height in the character height array, searching the maximum value in the horizontal spacing array between the characters, and taking the maximum value as a character scoreCutting a threshold value to finally obtain a 7-character segmentation image IMG on the license plates1…IMGs7;
The horizontal histogram calculation formula is as follows:
Figure FDA0003089512690000021
wherein, IMG _ Histrow(i) Distributing histograms of white pixel points in the horizontal direction of a target image, wherein MAXH is the number of pixel point rows with upper and lower edges and upper and lower frames, and H (i) is the number of white pixel points in the ith row of the license plate image;
the optimal threshold calculation formula of the character segmentation area and the non-character segmentation area is as follows:
Figure FDA0003089512690000022
wherein, Ave _ IMG _ HistrowMIN _ IMG _ Hist being the mean value of the horizontal direction histogramrowIs the minimum value of the horizontal direction histogram, Mean _ IMG _ HistrowAn optimal threshold value for dividing character areas and non-character areas;
the fifth step comprises the following steps:
step I, IMG for the target character images1…IMGs7, carrying out normalization processing to ensure that the size of each character image is equal;
step II, creating a standard license plate character image library, wherein 34 provinces are abbreviated as Chinese characters, letters A-Z and numbers 0-9;
step III, traversing a standard license plate character image library, and aiming at a target character image IMGs1 corresponds to a certain pixel point a (x)a,ya) And a pixel point b (x) corresponding to each character image in the standard license plate character image libraryb,yb) And calculating the Euclidean distance between the two corresponding points:
Figure FDA0003089512690000023
wherein d (a, b) is the Euclidean distance between the two corresponding points;
finding a target character image IMGs1, storing the sum of Euclidean distances between the total pixels of the array and corresponding points of each character image in a standard license plate character image library to an array IMG _ Dis _ Arr;
step IV, traversing the array IMG _ Dis _ Arr to find the minimum Euclidean distance, wherein the image in the corresponding standard license plate character image library is the recognized character;
step V, traversing IMG of target character images2…IMGsAnd 7, repeating the step III and the step IV until other residual license plate characters are identified.
2. The machine vision-based automobile license plate character segmentation and recognition algorithm of claim 1, wherein an image compression ratio in the pixel point compression process in the second step is as follows:
Figure FDA0003089512690000024
wherein R isimgThe image compression rate is delta, the threshold pixel height is delta, and the pixel height of the automobile image sample containing the license plate is h.
3. The machine vision-based automobile license plate character segmentation and recognition algorithm of claim 2, wherein the image binarization process in the second step comprises:
2/3 size of the gray value range of the image pixel point is selected, and the binarization optimal threshold value is obtained by adopting the following formula:
Figure FDA0003089512690000031
wherein, VmaxIs the maximum value of gray value of image pixel point, VminIs gray value of image pixel pointMinimum value, VbestIs the best threshold value for binarization.
4. The machine vision-based automobile license plate character segmentation and recognition algorithm of claim 3, wherein the license plate image positioning process of the third step comprises the following steps:
step a, adopting a rectangular template with the pixel size of mxn, performing expansion operation on the preprocessed image IMG1, filling holes, communicating license plate areas, then corroding by using the rectangular template with the same size, eliminating isolated small areas, reserving large communicated areas, and finally obtaining a processed target image IMG 2;
b, performing open operation on the target image IMG2, performing corrosion operation on the target image by adopting a rectangular template with the size of m multiplied by n, further eliminating a small noise area of a non-license plate area, and then expanding the small noise area by using the template with the same size to obtain a target image IMG3 with most background noise eliminated;
c, performing matrix template opening operation on the target image IMG3 in the size of m multiplied by n to obtain a binary target image IMG4 which basically only has a license plate area, and preliminarily positioning the license plate;
and d, performing open operation on the target image IMG4 by taking a circular template with the radius of r, and further eliminating background small noise interference to obtain a target image IMG5 positioned in the license plate area.
5. The machine vision-based automobile license plate character segmentation and recognition algorithm of claim 4, wherein the license plate region tilt correction angle in the step A is as follows:
α=|90°-θ|;
wherein, theta is the actual inclination angle of the license plate.
6. The machine-vision-based automobile license plate character segmentation recognition algorithm of claim 5, wherein the elimination of space characters process comprises:
and performing open operation on the target image after the inclination correction, performing corrosion operation on the target image after the inclination correction by adopting a circular template with the radius of r, and then expanding the target image by using the circular template with the radius of r to obtain the target image without the interval mark points.
CN201810899477.6A 2018-08-09 2018-08-09 Automobile license plate character segmentation and recognition algorithm based on machine vision Active CN109800752B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810899477.6A CN109800752B (en) 2018-08-09 2018-08-09 Automobile license plate character segmentation and recognition algorithm based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810899477.6A CN109800752B (en) 2018-08-09 2018-08-09 Automobile license plate character segmentation and recognition algorithm based on machine vision

Publications (2)

Publication Number Publication Date
CN109800752A CN109800752A (en) 2019-05-24
CN109800752B true CN109800752B (en) 2022-01-07

Family

ID=66556217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810899477.6A Active CN109800752B (en) 2018-08-09 2018-08-09 Automobile license plate character segmentation and recognition algorithm based on machine vision

Country Status (1)

Country Link
CN (1) CN109800752B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110659632B (en) * 2019-09-29 2022-08-12 公安部交通管理科学研究所 System and method for testing motor vehicle number plate identification performance of traffic technology monitoring equipment based on image block assignment
CN110933185B (en) * 2019-12-18 2022-04-01 同望科技股份有限公司 Engineering vehicle management method based on Internet of things
CN111414920B (en) * 2020-03-27 2023-12-26 日钢营口中板有限公司 Method for improving billet number identification accuracy
CN111754525A (en) * 2020-06-23 2020-10-09 苏州中科全象智能科技有限公司 Industrial character detection process based on non-precise segmentation
CN112381088A (en) * 2020-11-11 2021-02-19 上善智城(苏州)信息科技有限公司 License plate recognition method and system for oil tank truck
CN113296516B (en) * 2021-05-24 2022-07-12 淮阴工学院 Robot control method for automatically lifting automobile
CN113449639A (en) * 2021-06-29 2021-09-28 深圳市海亿达科技股份有限公司 Non-contact data acquisition method for instrument by gateway of Internet of things
CN114998922B (en) * 2022-07-29 2022-11-04 成都薯片科技有限公司 Electronic contract generating method based on format template

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104156704A (en) * 2014-08-04 2014-11-19 胡艳艳 Novel license plate identification method and system
CN106709530A (en) * 2017-01-17 2017-05-24 中国科学院上海高等研究院 License plate recognition method based on video
CN107992785A (en) * 2016-10-26 2018-05-04 北京君正集成电路股份有限公司 The recognition methods of fuzzy license plate and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104156704A (en) * 2014-08-04 2014-11-19 胡艳艳 Novel license plate identification method and system
CN107992785A (en) * 2016-10-26 2018-05-04 北京君正集成电路股份有限公司 The recognition methods of fuzzy license plate and device
CN106709530A (en) * 2017-01-17 2017-05-24 中国科学院上海高等研究院 License plate recognition method based on video

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于机器学习的模糊车牌的识别;刘晓黎;《中国优秀硕士学位论文全文数据库信息科技辑》;20130215;第12-42页 *

Also Published As

Publication number Publication date
CN109800752A (en) 2019-05-24

Similar Documents

Publication Publication Date Title
CN109800752B (en) Automobile license plate character segmentation and recognition algorithm based on machine vision
CN109784344B (en) Image non-target filtering method for ground plane identification recognition
CN105373794B (en) A kind of licence plate recognition method
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
CN103324930B (en) A kind of registration number character dividing method based on grey level histogram binaryzation
CN103136528B (en) A kind of licence plate recognition method based on dual edge detection
CN110210451B (en) Zebra crossing detection method
CN103530600A (en) License plate recognition method and system under complicated illumination
CN109190483B (en) Lane line detection method based on vision
CN111382704A (en) Vehicle line-pressing violation judgment method and device based on deep learning and storage medium
CN109948552B (en) Method for detecting lane line in complex traffic environment
CN109886168B (en) Ground traffic sign identification method based on hierarchy
Liu et al. ROI perspective transform based road marking detection and recognition
CN112115800A (en) Vehicle combination recognition system and method based on deep learning target detection
CN103440785A (en) Method for rapid lane departure warning
CN106951896A (en) A kind of license plate image sloped correcting method
Rajput et al. Using radon transform to recognize skewed images of vehicular license plates
Islam et al. Bangla license plate detection, recognition and authentication with morphological process and template matching
Salahshoor et al. Application of intelligent systems for iranian license plate recognition
Gupta et al. Robust lane detection using multiple features
Lu A lane detection, tracking and recognition system for smart vehicles
Deb et al. Automatic vehicle identification by plate recognition for intelligent transportation system applications
Gu et al. Robust road lane detection using extremal-region enhancement
CN113205687B (en) Drunk driving vehicle track recognition system based on video monitoring

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