CN114387591A - License plate recognition method, system, equipment and storage medium - Google Patents

License plate recognition method, system, equipment and storage medium Download PDF

Info

Publication number
CN114387591A
CN114387591A CN202210033748.6A CN202210033748A CN114387591A CN 114387591 A CN114387591 A CN 114387591A CN 202210033748 A CN202210033748 A CN 202210033748A CN 114387591 A CN114387591 A CN 114387591A
Authority
CN
China
Prior art keywords
license plate
image
recognition
character
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210033748.6A
Other languages
Chinese (zh)
Inventor
董文强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202210033748.6A priority Critical patent/CN114387591A/en
Publication of CN114387591A publication Critical patent/CN114387591A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Character Input (AREA)
  • Character Discrimination (AREA)
  • Image Analysis (AREA)

Abstract

The application provides a license plate recognition method, a license plate recognition system, license plate recognition equipment and a storage medium, wherein a vehicle image is obtained in advance, and image preprocessing is carried out to obtain a preprocessed image; positioning a license plate area according to the preprocessed image; correcting the license plate region through a perspective transformation tilt correction algorithm to obtain a standard license plate image; and obtaining the license plate symbol by character segmentation according to the standard license plate image. The license plate recognition method can be better suitable for the license plate recognition task in a complex scene, and the accuracy of license plate recognition is improved. The method solves the problem of noise point interference of the collected photos, and better improves the identification accuracy under the conditions of different light intensity, complex background in the original image and the like.

Description

License plate recognition method, system, equipment and storage medium
Technical Field
The application belongs to the technical field of artificial intelligence, and particularly relates to a license plate recognition method, a license plate recognition system, license plate recognition equipment and a storage medium.
Background
Nowadays, the vehicle holding capacity and traffic running capacity of China are continuously increased, and the work task of road traffic management is increasingly heavy. Today, the development of artificial intelligence is rapid, and an intelligent traffic system takes place at the same time, gradually replaces the traditional artificial supervision, and becomes the mainstream system of the current traffic supervision. The system integrates multiple functions of license plate recognition, face recognition, road condition acquisition, violation evidence obtaining, traffic light supervision and the like, realizes information interaction through digital management, and effectively solves a plurality of problems in the traffic management field.
Under the current hardware condition, the license plate number is the most critical identity information of the vehicle. And the off-site violation detection management system generates a correct violation record according to the vehicle violation behaviors and the license plate number. And in order to avoid punishment during the illegal driving, some drivers intentionally use objects such as a compact disc, a leaflet, gloves and the like to shield the license plate, so that the license plate cannot be correctly identified. In addition, due to artificial or non-artificial reasons, the number plate is stained, and the number plate cannot be correctly identified. And further the normal order of traffic management is disturbed, and great hidden danger is caused to traffic safety.
The license plate recognition is widely applied to the expressway, and the requirement on accuracy is higher and higher. Such as Electronic Toll Collection (ETC) systems and detection of traffic violation vehicles, but also for access to residential or underground garages. But the problem that the license plate recognition accuracy is influenced by the conditions of license plate position deviation, license plate fouling, poor illumination and the like exists. The image quality is a key factor influencing the high and low vehicle identification rates, but some noise points inevitably exist in the acquired images. These noise points affect more or less the accuracy of the image localization. Therefore, the existing license plate recognition cannot meet the high-requirement license plate recognition requirement through conventional image preprocessing and recognition, and the development of related license plate-based services is seriously influenced.
Disclosure of Invention
The invention provides a license plate recognition method, a license plate recognition system, license plate recognition equipment and a storage medium, and aims to solve the problems that the existing collected photos are large in noise point interference and inaccurate in license plate recognition.
According to a first aspect of an embodiment of the present application, there is provided a license plate recognition method, including the steps of:
pre-acquiring a vehicle image, and performing image preprocessing to obtain a preprocessed image;
positioning a license plate area according to the preprocessed image;
correcting the license plate region through a perspective transformation tilt correction algorithm to obtain a standard license plate image;
and obtaining the license plate symbol by character segmentation according to the standard license plate image.
In some embodiments of the present application, locating a license plate region according to a preprocessed image specifically includes:
presetting an image pixel exposure threshold, wherein the preset exposure threshold is higher than a normal exposure value of an image pixel;
calculating the RGB value of each pixel point of the license plate image in the preprocessed image;
calculating an exposure difference value between the RGB value of each pixel point of the license plate image and the RGB value of the license plate under normal exposure;
if the exposure difference value is within the threshold range, determining the license plate area; and if the exposure difference exceeds the threshold range, determining that the area is not the license plate area.
In some embodiments of the present application, after locating the license plate region according to the preprocessed image, the method further includes:
performing expansion operation on the image of the license plate area, and connecting all characters of the license plate area into a whole;
carrying out morphological corrosion operation to remove isolated noise points in the image to obtain a denoised license plate region;
and according to the preset license plate characteristics, eliminating a rectangular region which does not accord with the preset license plate characteristics in the denoised license plate region to obtain an accurate license plate region.
In some embodiments of the present application, the license plate region is corrected by a perspective transformation tilt correction algorithm to obtain a standard license plate image, which specifically includes:
acquiring a license plate area needing to be corrected, and inputting the license plate area to an edge detection model to obtain a binary edge image; the edge detection model is obtained by training a large amount of license plate region data with edge information in advance;
positioning the license plate according to the binary edge image to obtain a license plate boundary frame and vertex coordinates of the license plate boundary frame;
calculating a perspective transformation matrix according to the vertex coordinates of the license plate bounding box; and performing perspective transformation on the images in the license plate boundary frame and the vertex coordinates of the license plate boundary frame through a perspective transformation matrix to obtain corrected license plate images.
In some embodiments of the present application, obtaining a license plate symbol by character segmentation according to a standard license plate image specifically includes:
determining the boundaries of characters in the license plate by using a hopping frequency method according to a standard license plate image; removing the frame and the rivet of the license plate by utilizing the self-negative boundary to obtain a clear character boundary of the license plate;
removing residual noise points by using morphological corrosion treatment according to the boundaries of the license plate characters to obtain refined boundaries of the license plate characters;
and (5) thinning the boundary according to the license plate characters, and performing character segmentation by using a vertical projection method to obtain license plate symbols.
In some embodiments of the present application, after obtaining a license plate symbol by character segmentation according to a standard license plate image, the method further includes:
and recognizing the license plate symbols through a pre-trained recognition network to obtain the character, number and/or letter information of the license plate.
In some embodiments of the present application, the recognition network includes a Chinese character recognition network for recognizing Chinese characters, and a character recognition network for recognizing letters and numbers.
According to a second aspect of the embodiments of the present application, there is provided a license plate recognition system, specifically including:
an image preprocessing module: the system comprises a vehicle image acquisition unit, a vehicle image processing unit and a vehicle image processing unit, wherein the vehicle image acquisition unit is used for acquiring a vehicle image in advance and carrying out image preprocessing to obtain a preprocessed image;
license plate region image: the license plate area is positioned according to the preprocessed image;
license plate image module: the license plate region correction is carried out on the license plate region through a perspective transformation tilt correction algorithm to obtain a standard license plate image;
the license plate recognition module: the license plate symbol is obtained by character segmentation according to the standard license plate image.
According to a third aspect of the embodiments of the present application, there is provided a license plate recognition apparatus including:
a memory: for storing executable instructions; and
the processor is connected with the memory to execute the executable instructions so as to complete the license plate recognition method.
According to a fourth aspect of embodiments of the present application, there is provided a computer-readable storage medium having a computer program stored thereon; the computer program is executed by a processor to implement a license plate recognition method.
By adopting the license plate recognition method, the license plate recognition system, the license plate recognition equipment and the storage medium, the vehicle image is obtained in advance, and the image is preprocessed to obtain a preprocessed image; positioning a license plate area according to the preprocessed image; correcting the license plate region through a perspective transformation tilt correction algorithm to obtain a standard license plate image; and obtaining the license plate symbol by character segmentation according to the standard license plate image. The license plate recognition method can be better suitable for the license plate recognition task in a complex scene, and the accuracy of license plate recognition is improved.
The method solves the problem of noise point interference of the collected photos, and better improves the identification accuracy under the conditions of different light intensity, complex background in the original image and the like.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic diagram illustrating steps of a license plate recognition method according to an embodiment of the present application;
a schematic diagram of an image pre-processing flow according to the present application is shown in fig. 2;
fig. 3 is a schematic flow chart illustrating a license plate recognition method according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating steps of a license plate recognition method according to another embodiment of the present application;
fig. 5 is a schematic flow chart illustrating a license plate recognition method according to another embodiment of the present application;
fig. 6 is a schematic structural diagram illustrating a license plate recognition system according to an embodiment of the present application;
fig. 7 is a schematic structural diagram illustrating a license plate recognition device according to an embodiment of the present application.
Detailed Description
In the process of realizing the application, the inventor finds that the license plate recognition accuracy is seriously influenced due to the conditions of license plate position deviation, license plate fouling, poor illumination and the like in the license plate recognition. The image quality is a key factor influencing the high and low vehicle identification rates, but some noise points inevitably exist in the acquired images. These noise points all affect the accuracy of image localization. Therefore, the existing license plate recognition cannot meet the high-requirement license plate recognition requirement through conventional image preprocessing and recognition, and the development of related license plate-based services is seriously influenced.
In order to overcome the defects, the license plate recognition method, the license plate recognition system, the license plate recognition equipment and the storage medium acquire the vehicle image in advance, and perform image preprocessing to obtain a preprocessed image; positioning a license plate area according to the preprocessed image; correcting the license plate region through a perspective transformation tilt correction algorithm to obtain a standard license plate image; and obtaining the license plate symbol by character segmentation according to the standard license plate image. The license plate recognition method can be better suitable for the license plate recognition task in a complex scene, and the accuracy of license plate recognition is improved.
The method solves the problem of noise point interference of the collected photos, and better improves the identification accuracy under the conditions of different light intensity, complex background in the original image and the like.
Further, the method comprises the steps of preprocessing a license plate image, mainly adopting a license plate positioning method combining mathematical morphology processing and license plate color information characteristics with morphology, removing license plate frames and rivets through a perspective transformation tilt correction algorithm and a jump number method, and segmenting characters through a vertical projection method.
The concrete implementation is as follows:
1) and (5) image preprocessing.
2) And positioning the license plate area.
Firstly, comparing the color information characteristics of the license plate for coarse positioning; secondly, the license plate is finely positioned by adopting the characteristic comparison combined with morphology.
3) And (4) correcting the license plate region through a perspective transformation tilt correction algorithm to obtain a standard license plate image.
4) And obtaining the license plate symbol by character segmentation according to the standard license plate image.
5) And recognizing the license plate symbols through a pre-trained recognition network to obtain the character, number and/or letter information of the license plate.
In order to make the technical solutions and advantages of the embodiments of the present application more apparent, the following further detailed description of the exemplary embodiments of the present application with reference to the accompanying drawings makes it clear that the described embodiments are only a part of the embodiments of the present application, and are not exhaustive of all embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Example 1
Fig. 1 is a schematic diagram illustrating steps of a license plate recognition method according to an embodiment of the present application.
As shown in fig. 1, the license plate recognition method of the present embodiment specifically includes the following steps:
s101: and acquiring a vehicle image in advance, and performing image preprocessing to obtain a preprocessed image.
A schematic diagram of an image pre-processing flow according to the present application is shown in fig. 2.
Firstly, as shown in fig. 2, an input vehicle image is acquired and zoomed to a certain size through the image; then, the image is preprocessed by adopting methods such as Gaussian smoothing, median filtering, graying, binarization and histogram equalization, and the like, so that irrelevant information in the image is eliminated, useful real information is recovered, the detectability of characteristic information of the relevant image is enhanced, and the data is simplified to the maximum extent. The reliability of subsequent feature extraction, image segmentation, matching and recognition on the images is improved, and an image basis is provided for the accuracy of subsequent license plate recognition.
S102: and positioning the license plate area according to the preprocessed image.
Whether the license plate positioning is accurate or not directly influences the accuracy of the subsequent license plate character division and character recognition algorithm, and the process of accurately positioning the license plate region from the acquired original image. In an actual license plate recognition system, due to the reasons of different light intensities, complex background in an original image and the like, it is difficult to accurately locate a license plate region under some special conditions.
Firstly, the license plate color information features are compared to perform rough positioning. The positioning accuracy is increased.
The application takes a blue-bottom white-word license plate used by a small-sized civil vehicle as an example.
S1021: presetting an image pixel exposure threshold, wherein the preset exposure threshold is higher than a normal exposure value of an image pixel; the preset image pixel exposure threshold value enables the license plate image to be positioned even if the license plate area is not under normal exposure.
S1022: and calculating the difference value between the RGB value of each pixel point of the license plate image and the blue RGB value of the license plate under normal exposure.
S1023: if the exposure difference value is within the threshold range, determining that the vehicle license plate is a license plate area; and if the exposure difference value exceeds the threshold range, determining that the area is not the license plate area.
Through coarse license plate positioning, a suspected license plate area can be obtained from the collected input image, the area may have a plurality of areas, and a plurality of qualified non-license plate area pixel points may also be positioned, so that further fine license plate positioning is needed to obtain an accurate license plate area.
Next, the present application uses feature comparison in combination with morphology for license plate fine localization.
The located license plate is further processed by a morphological method to obtain a final license plate region, and then relevant operation of mathematical morphology is used for correspondingly processing the image to prepare for a subsequent screening process.
S1025: performing expansion operation on the image of the license plate area, and connecting all characters of the license plate area into a whole;
s1026: carrying out morphological corrosion operation to remove isolated noise points in the image to obtain a denoised license plate region;
s1027: and according to the preset license plate characteristics, eliminating a rectangular region which does not accord with the preset license plate characteristics in the denoised license plate region to obtain an accurate license plate region.
Through the two license plate coarse/fine positioning steps, the accuracy of license plate region positioning can be greatly improved.
S103: and (4) correcting the license plate region through a perspective transformation tilt correction algorithm to obtain a standard license plate image.
Due to the facts that the installation position of the image collecting device is not fixed, the hanging heights of license plates of different vehicles are not determined, and the like, the license plates are inclined to a certain degree possibly caused by the external factors, and the license plate area is not in a standard shape and angle.
Therefore, the license plate region correction is carried out through the inclination correction algorithm of perspective transformation, and the specific correction steps are as follows:
fig. 3 is a schematic flowchart illustrating a license plate recognition method according to an embodiment of the present application.
As shown in fig. 3, detecting whether the license plate region is inclined, if so, performing license plate correction; otherwise, directly outputting the license plate region to the next step for license plate character segmentation.
Specifically, the method comprises the following steps:
s1031: acquiring a license plate area needing to be corrected, and inputting the license plate area to an edge detection model to obtain a binary edge image; the edge detection model is obtained by training a large amount of license plate region data with edge information in advance.
S1032: positioning the license plate according to the binary edge image to obtain a license plate boundary frame and vertex coordinates of the license plate boundary frame;
specifically, binarization processing is carried out on the binarization edge image, and the edges in the image after binarization processing are eliminated by adopting morphological operation, so as to obtain a binary edge mask image; performing linear extraction on the obtained binary edge mask image by adopting a linear detection algorithm to obtain an approximately horizontal or vertical straight line, and eliminating lines in the straight line, which are close to the boundary area of the binary edge mask image; and finally, according to the extracted straight line, forming a horizontal straight line set and a vertical straight line set.
Then, calculating straight line intersection points in the horizontal straight line set and the vertical straight line set to obtain an intersection point set; filtering out points outside the boundary region of the binary edge mask image in the intersection point set, and filtering out intersection points of which the distance does not meet the preset requirement, and finally obtaining an accurate vertex set; traversing the vertex set to obtain a polygon set; and calculating the area of the polygon corresponding to the polygon set, extracting the polygon with the largest polygon area as the license plate boundary frame, and further determining the vertex coordinates of the license plate boundary frame.
S1033: calculating a perspective transformation matrix according to the vertex coordinates of the license plate bounding box; and performing perspective transformation on the images in the license plate boundary frame and the vertex coordinates of the license plate boundary frame through a perspective transformation matrix to obtain corrected license plate images.
S104: and obtaining the license plate symbol by character segmentation according to the standard license plate image.
Specifically, the method comprises the following steps:
s1041: determining the boundaries of characters in the license plate by using a hopping frequency method according to a standard license plate image; and removing the frame and the rivet of the license plate by utilizing the self-negative boundary to obtain a clear character boundary of the license plate.
S1042: and removing residual noise points by using morphological corrosion treatment according to the boundaries of the license plate characters to obtain refined boundaries of the license plate characters.
S1043: and (5) thinning the boundary according to the license plate characters, and performing character segmentation by using a vertical projection method to obtain license plate symbols.
When the characters are divided, firstly, calculating the number of white pixel points in each row, obtaining a histogram after vertical projection, and judging the initial position of each character according to the histogram;
then, scanning the projection histogram from left to right, finding out the first column with white pixel points, and determining that the column is the left boundary of the first character of the license plate.
If the white pixel point exists in the last row and the black area does not exist in the next row, the row is determined as the right boundary of the first character.
And similarly, the rest characters can be divided according to the operation, and finally the obtained characters are subjected to normalization processing to obtain the license plate characters suitable for network recognition.
Fig. 4 is a schematic diagram illustrating steps of a license plate recognition method according to another embodiment of the present application.
As shown in fig. 4, after obtaining the license plate symbol by character segmentation, the method further includes:
s105: and recognizing the license plate symbols through a pre-trained recognition network to obtain the character, number and/or letter information of the license plate.
The recognition network comprises a Chinese character recognition network for recognizing Chinese characters and a character recognition network for recognizing letters and numbers.
Fig. 5 is a flow chart illustrating a license plate recognition method according to another embodiment of the present application,
as shown in fig. 5, when performing license plate character recognition, a recognition network needs to be pre-trained first.
This application trains two recognition networks: a Chinese character recognition network for recognizing Chinese characters, and a character recognition network for recognizing letters and numbers, respectively.
In deep learning, data is generally divided into training data and test data to perform learning, testing, and the like of a neural network. The purpose of the division into supervisory data and test data is to be able to correctly evaluate the generalization ability of neural network models.
Regarding the characters needing to be recognized by the license plate, the license plate contains 7 characters according to the characteristics of the license plate, wherein the 1 st character is short for each provincial administrative district and is 34 in total; the 2 nd character is a city code, consisting of A-Z, and in order not to be confused with 1 and 0, excluding the letters I and O, for a total of 24; the 3 rd to 7 th characters are composed of numbers and letters, and the total number of the characters is 10, and the number of the characters is 24.
The Chinese character recognition network is used for recognizing the short names of the provincial administrative regions, and the alphanumeric recognition network is used for recognizing the remaining capital English letters and Arabic numerals on the license plate.
And finally, training through a large number of data sets to obtain a pre-trained recognition network, and detecting license plate symbols obtained through character segmentation through the pre-trained recognition network to obtain accurate license plate recognition information.
When the license plate area is located, firstly, comparing the license plate color information features for rough location; secondly, the license plate is finely positioned by adopting the characteristic comparison combined with morphology. The noise point interference and the image problem caused by dim light of the vehicle image at that time are overcome. Through the two license plate positioning steps, the accuracy of license plate region positioning can be greatly improved.
In addition, the method and the device also consider that the installation position of the image collecting device is not fixed, the hanging heights of license plates of different vehicles are not determined, and other factors can cause the license plates to incline to a certain degree due to the external factors, so that the license plate area is not in a standard shape and angle.
In summary, in the license plate recognition method in the embodiment of the application, a vehicle image is obtained in advance, and image preprocessing is performed to obtain a preprocessed image; positioning a license plate area according to the preprocessed image; correcting the license plate region through a perspective transformation tilt correction algorithm to obtain a standard license plate image; and obtaining the license plate symbol by character segmentation according to the standard license plate image.
Compared with the prior art, when the condition that the license plate is shielded or stained is considered, the noise point interference of the license plate image and the current ambient light of the vehicle image are considered at the same time. The license plate recognition method can be better suitable for the license plate recognition task in a complex scene, and the accuracy of license plate recognition is improved.
The method solves the problem of noise point interference of the collected photos, and better improves the identification accuracy under the conditions of different light intensity, complex background in the original image and the like.
Example 2
For details not disclosed in the license plate recognition system of the present embodiment, please refer to specific implementation contents of the license plate recognition methods in other embodiments.
Fig. 6 is a schematic structural diagram illustrating a license plate recognition system according to an embodiment of the present application.
As shown in fig. 6, the license plate recognition system specifically includes:
the image preprocessing module 10: the method is used for acquiring the vehicle image in advance and carrying out image preprocessing to obtain a preprocessed image.
Firstly, acquiring an input vehicle image, and zooming the image to a certain size; then, the image is preprocessed by adopting methods such as Gaussian smoothing, median filtering, graying, binarization and histogram equalization, and the like, so that irrelevant information in the image is eliminated, useful real information is recovered, the detectability of characteristic information of the relevant image is enhanced, and the data is simplified to the maximum extent. The reliability of subsequent feature extraction, image segmentation, matching and recognition on the images is improved, and an image basis is provided for the accuracy of subsequent license plate recognition.
License plate region image 20: and the license plate area is positioned according to the preprocessed image.
Whether the license plate positioning is accurate or not directly influences the accuracy of the subsequent license plate character division and character recognition algorithm, and the process of accurately positioning the license plate region from the acquired original image. In an actual license plate recognition system, due to the reasons of different light intensities, complex background in an original image and the like, it is difficult to accurately locate a license plate region under some special conditions.
Firstly, the license plate color information features are compared to perform rough positioning. The positioning accuracy is increased.
The application takes a blue-bottom white-word license plate used by a small-sized civil vehicle as an example.
Firstly, presetting an image pixel exposure threshold value, wherein the preset exposure threshold value is higher than a normal exposure value of an image pixel; the preset image pixel exposure threshold value enables the license plate image to be positioned even if the license plate area is not under normal exposure.
And secondly, calculating the difference value between the RGB value of each pixel point of the license plate image and the blue RGB value of the license plate under normal exposure.
Then, if the exposure difference value is within the threshold range, the license plate area is determined; and if the exposure difference value exceeds the threshold range, determining that the area is not the license plate area.
Through coarse license plate positioning, a suspected license plate area can be obtained from the collected input image, the area may have a plurality of areas, and a plurality of qualified non-license plate area pixel points may also be positioned, so that further fine license plate positioning is needed to obtain an accurate license plate area.
Next, the present application uses feature comparison in combination with morphology for license plate fine localization.
The located license plate is further processed by a morphological method to obtain a final license plate region, and then relevant operation of mathematical morphology is used for correspondingly processing the image to prepare for a subsequent screening process.
Performing expansion operation on the image of the license plate area, and connecting all characters of the license plate area into a whole;
then, carrying out morphological corrosion operation to remove isolated noise points in the image to obtain a denoised license plate region;
and finally, according to the preset license plate characteristics, eliminating a rectangular region which does not accord with the preset license plate characteristics in the denoised license plate region to obtain an accurate license plate region.
Through the two license plate coarse/fine positioning steps, the accuracy of license plate region positioning can be greatly improved.
License plate image module 30: and the license plate correction method is used for correcting the license plate region through a perspective transformation tilt correction algorithm to obtain a standard license plate image.
Due to the facts that the installation position of the image collecting device is not fixed, the hanging heights of license plates of different vehicles are not determined, and the like, the license plates are inclined to a certain degree possibly caused by the external factors, and the license plate area is not in a standard shape and angle.
Therefore, the license plate region correction is carried out through the inclination correction algorithm of perspective transformation, and the specific correction steps are as follows:
detecting whether the license plate area is inclined, and if so, correcting the license plate; otherwise, directly outputting the license plate region to the next step for license plate character segmentation.
Specifically, the license plate correction method comprises the following steps:
firstly, acquiring a license plate region needing to be corrected, and inputting the license plate region into an edge detection model to obtain a binary edge image; the edge detection model is obtained by training a large amount of license plate region data with edge information in advance.
Secondly, license plate positioning is carried out according to the binary edge image, and a license plate boundary frame and vertex coordinates of the license plate boundary frame are obtained.
Finally, calculating a perspective transformation matrix according to the vertex coordinates of the license plate bounding box; and performing perspective transformation on the images in the license plate boundary frame and the vertex coordinates of the license plate boundary frame through a perspective transformation matrix to obtain corrected license plate images.
License plate recognition module 40: the license plate symbol is obtained by character segmentation according to the standard license plate image.
Specifically, the method comprises the following steps:
firstly, determining the boundaries of characters in a license plate by using a hopping frequency method according to a standard license plate image; and removing the frame and the rivet of the license plate by utilizing the self-negative boundary to obtain a clear character boundary of the license plate.
And then, removing residual noise points by using morphological corrosion treatment according to the boundaries of the license plate characters to obtain refined boundaries of the license plate characters.
And finally, thinning the boundary according to the license plate characters, and performing character segmentation by using a vertical projection method to obtain license plate symbols.
When the characters are divided, firstly, calculating the number of white pixel points in each row, obtaining a histogram after vertical projection, and judging the initial position of each character according to the histogram;
then, scanning the projection histogram from left to right, finding out the first column with white pixel points, and determining that the column is the left boundary of the first character of the license plate.
If the white pixel point exists in the last row and the black area does not exist in the next row, the row is determined as the right boundary of the first character.
And similarly, the rest characters can be divided according to the operation, and finally the obtained characters are subjected to normalization processing to obtain the license plate characters suitable for network recognition.
In the license plate recognition system in the embodiment of the application, the image preprocessing module 10 acquires a vehicle image in advance, and performs image preprocessing to obtain a preprocessed image; the license plate region image 20 positions the license plate region according to the preprocessed image; the license plate image module 30 corrects the license plate region by a tilt correction algorithm of perspective transformation to obtain a standard license plate image; the license plate recognition module 40 obtains license plate symbols through character segmentation according to the standard license plate image.
Compared with the prior art, when the condition that the license plate is shielded or stained is considered, the noise point interference of the license plate image and the current ambient light of the vehicle image are considered at the same time. The license plate recognition method can be better suitable for the license plate recognition task in a complex scene, and the accuracy of license plate recognition is improved.
The method solves the problem of noise point interference of the collected photos, and better improves the identification accuracy under the conditions of different light intensity, complex background in the original image and the like.
Example 3
For details that are not disclosed in the license plate recognition apparatus of the present embodiment, please refer to specific implementation contents of the license plate recognition method or system in other embodiments.
Fig. 7 is a schematic structural diagram illustrating a license plate recognition apparatus 400 according to an embodiment of the present disclosure.
As shown in fig. 7, the license plate recognition apparatus 400 includes:
the memory 402: for storing executable instructions; and
a processor 401 is coupled to the memory 402 to execute executable instructions to perform the motion vector prediction method.
It will be understood by those skilled in the art that the schematic diagram 7 is merely an example of the license plate recognition device 400, and does not constitute a limitation of the license plate recognition device 400, and may include more or less components than those shown, or some components in combination, or different components, for example, the license plate recognition device 400 may further include an input-output device, a network access device, a bus, etc.
The Processor 401 (CPU) may be other general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, or the like. The general purpose processor may be a microprocessor or the processor 401 may be any conventional processor or the like, and the processor 401 is a control center of the license plate recognition device 400 and connects various parts of the entire license plate recognition device 400 using various interfaces and lines.
The memory 402 may be used to store computer readable instructions and the processor 401 may implement the various functions of the license plate recognition device 400 by executing or executing computer readable instructions or modules stored in the memory 402 and invoking data stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the license plate recognition apparatus 400, and the like. In addition, the Memory 402 may include a hard disk, a Memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Memory Card (Flash Card), at least one disk storage device, a Flash Memory device, a Read-Only Memory (ROM), a Random Access Memory (RAM), or other non-volatile/volatile storage devices.
The integrated module of the license plate recognition device 400 may be stored in a computer-readable storage medium if it is implemented in the form of a software function module and sold or used as a separate product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by hardware related to computer readable instructions, which may be stored in a computer readable storage medium, and when the computer readable instructions are executed by a processor, the steps of the method embodiments may be implemented.
Example 4
The present embodiment provides a computer-readable storage medium having stored thereon a computer program; the computer program is executed by a processor to implement the license plate recognition method in other embodiments.
The license plate recognition device and the computer storage medium in the embodiment of the application acquire the vehicle image in advance, and perform image preprocessing to obtain a preprocessed image; positioning a license plate area according to the preprocessed image; correcting the license plate region through a perspective transformation tilt correction algorithm to obtain a standard license plate image; and obtaining the license plate symbol by character segmentation according to the standard license plate image.
Compared with the prior art, when the condition that the license plate is shielded or stained is considered, the noise point interference of the license plate image and the current ambient light of the vehicle image are considered at the same time. The license plate recognition method can be better suitable for the license plate recognition task in a complex scene, and the accuracy of license plate recognition is improved.
The method solves the problem of noise point interference of the collected photos, and better improves the identification accuracy under the conditions of different light intensity, complex background in the original image and the like.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A license plate recognition method is characterized by comprising the following steps:
pre-acquiring a vehicle image, and performing image preprocessing to obtain a preprocessed image;
positioning a license plate region according to the preprocessed image;
correcting the license plate region through a perspective transformation-based inclination correction algorithm to obtain a standard license plate image;
and obtaining the license plate symbol by character segmentation according to the standard license plate image.
2. The license plate recognition method of claim 1, wherein the locating a license plate region according to the pre-processed image comprises:
presetting an image pixel exposure threshold, wherein the preset exposure threshold is higher than a normal exposure value of an image pixel;
calculating the RGB value of each pixel point of the license plate image in the preprocessed image;
calculating an exposure difference value between the RGB value of each pixel point of the license plate image and the RGB value of the license plate under normal exposure;
if the exposure difference value is within the threshold range, determining the license plate area; and if the exposure difference value exceeds the threshold range, determining that the area is not the license plate area.
3. The license plate recognition method of claim 1, wherein after locating the license plate region according to the pre-processed image, further comprising:
performing expansion operation on the image of the license plate area, and connecting all characters of the license plate area into a whole;
carrying out morphological corrosion operation to remove isolated noise points in the image to obtain a denoised license plate region;
and according to the preset license plate characteristics, eliminating the rectangular area which does not accord with the preset license plate characteristics in the denoising license plate area to obtain an accurate license plate area.
4. The license plate recognition method of claim 1, wherein the license plate region is corrected by a perspective transformation-based tilt correction algorithm to obtain a standard license plate image, and the method comprises:
acquiring the license plate area needing to be corrected, and inputting the license plate area to an edge detection model to obtain a binary edge image; the edge detection model is obtained by training a large amount of license plate region data with edge information in advance;
positioning the license plate according to the binary edge image to obtain a license plate boundary frame and vertex coordinates of the license plate boundary frame;
calculating a perspective transformation matrix according to the vertex coordinates of the license plate bounding box; and performing perspective transformation on the images in the license plate boundary frame and the vertex coordinates of the license plate boundary frame through the perspective transformation matrix to obtain corrected license plate images.
5. The license plate recognition method of claim 1, wherein obtaining the license plate symbol by character segmentation according to the standard license plate image comprises:
determining the boundaries of characters in the license plate by using a hopping frequency method according to the standard license plate image; removing the frame and the rivet of the license plate by utilizing the self-negative boundary to obtain a clear character boundary of the license plate;
removing residual noise points by using morphological corrosion treatment according to the license plate character boundary to obtain a license plate character refined boundary;
and thinning the boundary according to the license plate characters, and performing character segmentation by using a vertical projection method to obtain license plate symbols.
6. The license plate recognition method of claim 1, wherein after obtaining the license plate symbol according to the standard license plate image by character segmentation, the method further comprises:
and recognizing the license plate symbols through a pre-trained recognition network to obtain the character, number and/or letter information of the license plate.
7. The license plate recognition method of claim 6, wherein the recognition network comprises a Chinese character recognition network for recognizing Chinese characters, and a character recognition network for recognizing letters and numbers.
8. A license plate recognition system is characterized by specifically comprising:
an image preprocessing module: the system comprises a vehicle image acquisition unit, a vehicle image processing unit and a vehicle image processing unit, wherein the vehicle image acquisition unit is used for acquiring a vehicle image in advance and carrying out image preprocessing to obtain a preprocessed image;
license plate region image: the license plate region is positioned according to the preprocessed image;
license plate image module: the license plate region is corrected by an inclination correction algorithm of perspective transformation to obtain a standard license plate image;
the license plate recognition module: and the license plate symbol is obtained by character segmentation according to the standard license plate image.
9. A license plate recognition device, comprising:
a memory: for storing executable instructions; and
a processor connected with the memory for executing the executable instructions to perform the license plate recognition method of any one of claims 1-7.
10. A computer-readable storage medium, having stored thereon a computer program; the computer program is executed by a processor to implement the license plate recognition method according to any one of claims 1 to 7.
CN202210033748.6A 2022-01-12 2022-01-12 License plate recognition method, system, equipment and storage medium Pending CN114387591A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210033748.6A CN114387591A (en) 2022-01-12 2022-01-12 License plate recognition method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210033748.6A CN114387591A (en) 2022-01-12 2022-01-12 License plate recognition method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114387591A true CN114387591A (en) 2022-04-22

Family

ID=81202207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210033748.6A Pending CN114387591A (en) 2022-01-12 2022-01-12 License plate recognition method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114387591A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114882484A (en) * 2022-04-24 2022-08-09 江苏泽景汽车电子股份有限公司 License plate positioning method and device, electronic equipment and computer readable storage medium
CN114934467A (en) * 2022-07-08 2022-08-23 江苏永达电力金具有限公司 Parking space barrier gate control method, parking space barrier gate system and medium
CN115052189A (en) * 2022-06-06 2022-09-13 重庆法链科技有限责任公司 Video stream identification system and method
CN115984863A (en) * 2023-03-17 2023-04-18 中化现代农业有限公司 Image processing method, device, equipment and storage medium
CN116311212A (en) * 2023-05-15 2023-06-23 青岛恒天翼信息科技有限公司 Ship number identification method and device based on high-speed camera and in motion state

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015032087A (en) * 2013-08-01 2015-02-16 株式会社デンソー License plate recognition device and license plate recognition method
CN112883977A (en) * 2021-02-22 2021-06-01 三峡大学 License plate recognition method and device, electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015032087A (en) * 2013-08-01 2015-02-16 株式会社デンソー License plate recognition device and license plate recognition method
CN112883977A (en) * 2021-02-22 2021-06-01 三峡大学 License plate recognition method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
罗山;李玉莲;: "基于形态学与颜色信息的车牌定位新方法", 山西电子技术, no. 5, 15 October 2018 (2018-10-15), pages 6 - 8 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114882484A (en) * 2022-04-24 2022-08-09 江苏泽景汽车电子股份有限公司 License plate positioning method and device, electronic equipment and computer readable storage medium
CN115052189A (en) * 2022-06-06 2022-09-13 重庆法链科技有限责任公司 Video stream identification system and method
CN114934467A (en) * 2022-07-08 2022-08-23 江苏永达电力金具有限公司 Parking space barrier gate control method, parking space barrier gate system and medium
CN114934467B (en) * 2022-07-08 2024-04-30 江苏永达电力金具有限公司 Parking space barrier control method, parking space barrier system and medium
CN115984863A (en) * 2023-03-17 2023-04-18 中化现代农业有限公司 Image processing method, device, equipment and storage medium
CN115984863B (en) * 2023-03-17 2023-05-26 中化现代农业有限公司 Image processing method, device, equipment and storage medium
CN116311212A (en) * 2023-05-15 2023-06-23 青岛恒天翼信息科技有限公司 Ship number identification method and device based on high-speed camera and in motion state
CN116311212B (en) * 2023-05-15 2023-08-18 青岛恒天翼信息科技有限公司 Ship number identification method and device based on high-speed camera and in motion state

Similar Documents

Publication Publication Date Title
CN107545239B (en) Fake plate detection method based on license plate recognition and vehicle characteristic matching
CN110414507B (en) License plate recognition method and device, computer equipment and storage medium
CN114387591A (en) License plate recognition method, system, equipment and storage medium
CN111382704B (en) Vehicle line pressing violation judging method and device based on deep learning and storage medium
CN112686812B (en) Bank card inclination correction detection method and device, readable storage medium and terminal
KR101848019B1 (en) Method and Apparatus for Detecting Vehicle License Plate by Detecting Vehicle Area
CN108108734B (en) License plate recognition method and device
Khalifa et al. Malaysian Vehicle License Plate Recognition.
CN110909692A (en) Abnormal license plate recognition method and device, computer storage medium and electronic equipment
CN107194393B (en) Method and device for detecting temporary license plate
CN111325769A (en) Target object detection method and device
Azad et al. New method for optimization of license plate recognition system with use of edge detection and connected component
Jagannathan et al. License plate character segmentation using horizontal and vertical projection with dynamic thresholding
Babbar et al. A new approach for vehicle number plate detection
Antar et al. Automatic number plate recognition of Saudi license car plates
CN108205670B (en) License plate recognition method and device
CN116863458A (en) License plate recognition method, device, system and storage medium
Siddique et al. Development of an automatic vehicle license plate detection and recognition system for Bangladesh
CN111402185B (en) Image detection method and device
CN116152758A (en) Intelligent real-time accident detection and vehicle tracking method
CN110633705A (en) Low-illumination imaging license plate recognition method and device
Lin et al. Locating license plate based on edge features of intensity and saturation subimages
CN111178359A (en) License plate number recognition method, device and equipment and computer storage medium
Babu et al. A feature based approach for license plate-recognition of Indian number plates
US11615634B2 (en) Character recognition of license plate under complex background

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