License plate recognition method and system based on big data license plate sample
Through the license plate recognition method based on big data license plate samples, combined with image enhancement processing and color space conversion, and using the pre-trained license plate recognition model, the problem of insufficient robustness of the existing license plate recognition method in complex backgrounds and occlusion situations is solved, and higher license plate recognition accuracy and accuracy are achieved.
Patent Information
- Application Number
- CN202411120736.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2025-03-11
AI Technical Summary
The existing license plate recognition methods are not robust enough to deal with complex backgrounds and occlusions, resulting in low accuracy and accuracy of license plate recognition.
The license plate recognition method based on big data license plate samples is adopted to generate high-quality license plate images through image enhancement processing and color space conversion, and the license plate area recognition model and license plate number recognition model are used for license plate recognition.
It improves the accuracy and accuracy of license plate recognition, enhances the robustness of the license plate area recognition model, and can more accurately identify license plate numbers.
Smart Images

Figure CN119600583A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a license plate recognition method and system based on big data license plate samples. Background Art
[0002] Traditional license plate recognition methods rely on image processing technology, including steps such as color space conversion, threshold segmentation, edge detection, etc. Existing license plate recognition methods are not robust enough in dealing with complex backgrounds and occlusions, resulting in low license plate recognition precision and accuracy. Summary of the invention
[0003] The present invention provides a license plate recognition method and system based on big data license plate samples, so as to improve the license plate recognition precision and license plate recognition accuracy.
[0004] The present invention provides a license plate recognition method based on big data license plate samples, comprising:
[0005] Obtaining an initial license plate image to be recognized;
[0006] Performing image enhancement processing on the initial license plate image to obtain an enhanced license plate image;
[0007] Performing color space conversion on the enhanced license plate image to obtain a color space converted license plate image;
[0008] Input the spatially transformed license plate image into a preset license plate area recognition model to obtain a target license plate recognition area output by the license plate area recognition model; the license plate recognition model is trained based on different sample illumination images under different light and their calibrated sample target license plate recognition areas;
[0009] The target license plate recognition area is input into a preset license plate number recognition model to obtain the license plate number output by the license plate number recognition model.
[0010] According to the license plate recognition method based on big data license plate samples provided by the present invention, the image enhancement processing is performed on the initial license plate image to obtain an enhanced license plate image, including:
[0011] Obtaining blue parameters, red parameters and green parameters of the initial license plate image;
[0012] Using formula (1) to grayscale the initial license plate image, a grayscale image is obtained;
[0013] The grayscale image is smoothed using formula (2) to obtain the enhanced license plate image.
[0014] According to the license plate recognition method based on big data license plate samples provided by the present invention, the formula (1) is:
[0015] Gray=0.3560*B+0.5640*G+0.2149*R(1);
[0016] Wherein, Gray is the grayscale image, R is the red parameter, G is the green parameter, and B is the blue parameter;
[0017] The formula (2) is:
[0018]
[0019] Wherein, f(x, y) is the Gaussian function value at the point (x, y) in the grayscale image; μ x and μ y is the mean along the x-axis and y-axis; σ x and σ y is the standard deviation along the x-axis and y-axis.
[0020] According to the license plate recognition method based on big data license plate samples provided by the present invention, the license plate area recognition model includes a feature extraction network, a feature clustering network, a feature processing network and a feature screening network;
[0021] The step of inputting the spatially transformed license plate image into a preset license plate area recognition model to obtain a target license plate recognition area output by the license plate area recognition model includes:
[0022] Based on the feature extraction network, the first color component and the second color component of each pixel in the license plate image after the color space conversion are extracted through the first color channel and the second color channel of the color space, and a two-dimensional data point set is output;
[0023] Clustering the two-dimensional data point set based on the feature clustering network, and outputting an initial license plate recognition area;
[0024] Separating the adhered license plates in the initial license plate recognition area based on the feature processing network to obtain a license plate contour, and removing the pseudo edges in the license plate contour based on the average distance between the vertices of the convex hull in the license plate contour to output the real edge of the license plate;
[0025] Based on the feature screening network, the minimum circumscribed rectangle of the circle is fitted to the real edge of the license plate using the least squares method to obtain multiple license plate candidate frames, and the multiple license plate candidate frames are screened based on intersection and union comparison to output the target license plate recognition area.
[0026] According to the license plate recognition method based on big data license plate samples provided by the present invention, the license plate area recognition model also includes a cluster center determination network;
[0027] The method further comprises: clustering the two-dimensional data point set based on the feature clustering network and outputting the initial license plate recognition area.
[0028] Determine the first color channel of the color space through the network based on the cluster center, determine the histogram features of the first color channel color histogram of the license plate image after the color space conversion, the histogram features including the number and position of maximum values;
[0029] Based on the second color channel of the color space, determining a histogram feature of a color histogram of the second color channel of the license plate image after the color space conversion;
[0030] The number of clusters is the number of maximum values of the color histogram of the first color channel, and the cluster center is determined based on the histogram features of the color histogram of the first color channel and the histogram features of the color histogram of the second color channel.
[0031] According to the license plate recognition method based on big data license plate samples provided by the present invention, the feature processing network is used to separate the adhered license plates in the initial license plate recognition area to obtain the license plate contour, including:
[0032] Based on the feature processing network, the initial license plate recognition area is converted into a distance transformation map through distance transformation, and the distance transformation map is normalized to obtain a normalized distance transformation map;
[0033] The area in the normalized distance transformation image whose brightness is greater than a preset brightness threshold is used as the inner area of the initial license plate recognition area;
[0034] marking the inner area, and marking the outer area outside the inner area;
[0035] The marked regions are guided to separate the adhered license plates to obtain the license plate outline.
[0036] According to the license plate recognition method based on big data license plate samples provided by the present invention, the calculation formula for normalizing the distance transformation graph is:
[0037]
[0038] Among them, d(m,n) is the initial distance transformation map, d norm (m,n) is the grayscale value of the pixel at (m,n) in the normalized distance transformation map, d min (m,n) and d max (m,n) are the maximum grayscale value and the minimum grayscale value of the distance transform image before normalization.
[0039] According to the license plate recognition method based on big data license plate samples provided by the present invention, the pseudo edges in the license plate contour are removed based on the average value of the distances between the vertices of the convex hull in the license plate contour, and the real edges of the license plate are output, including:
[0040] Determine the convex hull of the edge of the license plate contour by a wrapping method based on the feature processing network, and calculate the distance between two adjacent vertices of the convex hull;
[0041] When the distance between two adjacent vertices of the convex hull is greater than a preset vertex threshold, determining that the edge segment of the convex hull is a pseudo edge;
[0042] The pseudo edge is removed to obtain the real edge of the license plate.
[0043] According to the license plate recognition method based on big data license plate samples provided by the present invention, the screening of the multiple license plate candidate frames based on intersection and union comparison and outputting the target license plate recognition area includes:
[0044] Calculate the intersection-over-union (IOU) value between the license plate candidate frames based on the feature screening network;
[0045] A license plate candidate frame whose IOU value is greater than a preset IOU threshold is determined from the multiple license plate candidate frames as the target license plate recognition area.
[0046] The present invention also provides a license plate recognition system based on big data license plate samples, comprising:
[0047] An acquisition module, used for acquiring an initial license plate image to be recognized;
[0048] An image enhancement processing module is used to perform image enhancement processing on the initial license plate image to obtain an enhanced license plate image;
[0049] A color space conversion module, used for performing color space conversion on the enhanced license plate image to obtain a color space converted license plate image;
[0050] A first recognition module is used to input the spatially transformed license plate image into a preset license plate area recognition model to obtain a target license plate recognition area output by the license plate area recognition model; the license plate recognition model is trained based on different sample illumination images under different light and their calibrated sample target license plate recognition areas;
[0051] The second recognition module is used to input the target license plate recognition area into a preset license plate number recognition model to obtain the license plate number output by the license plate number recognition model.
[0052] The present invention also provides an electronic device, comprising: a memory for storing a computer software program; a processor for reading and executing the computer software program, thereby implementing any of the above-mentioned license plate recognition methods based on big data license plate samples.
[0053] The present invention also provides a non-transitory computer-readable storage medium, characterized in that a computer software program is stored in the storage medium, and when the computer software program is executed by a processor, it implements any of the above-mentioned license plate recognition methods based on big data license plate samples.
[0054] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned license plate recognition methods based on big data license plate samples.
[0055] The license plate recognition method based on big data license plate samples provided by an embodiment of the present invention obtains a license plate area recognition model by training different sample illumination images under different light and their calibrated sample target license plate recognition areas, thereby increasing the robustness of the license plate area recognition model, and then processes the initial license plate image through image enhancement processing and color space conversion to obtain a high-quality processed license plate image. Therefore, the highly robust license plate area recognition model is combined with the high-quality processed license plate image to perform license plate recognition, so that the license plate number of the initial license plate image can be accurately obtained, thereby improving the license plate recognition precision and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a flow chart of a license plate recognition method based on big data license plate samples provided by the present invention;
[0057] Figure 2 It is a structural schematic diagram of a license plate recognition system based on big data license plate samples provided by the present invention;
[0058] Figure 3 A schematic diagram of an electronic device according to an embodiment of the present invention;
[0059] Figure 4 A schematic diagram of an embodiment of a computer-readable storage medium provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0060] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0061] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0062] In the description of the present invention, the term "for example" is used to mean "used as an example, illustration or explanation". Any embodiment described as "for example" in the present invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present invention.
[0063] Optionally, the license plate recognition method based on big data license plate samples uses the license plate recognition system as the execution body. Figure 1 , Figure 1 The figure is a flow chart of a license plate recognition method based on big data license plate samples provided by the present invention. The license plate recognition method based on big data license plate samples comprises the following steps:
[0064] Step 10: Obtain the initial license plate image to be recognized.
[0065] Optionally, the license plate recognition system responds to the license plate recognition instruction, and acquires the license plate image of the target vehicle through the image acquisition device to obtain the initial license plate image of the target vehicle to be identified, wherein the image acquisition device is an infrared camera, a camera, a video camera, etc.
[0066] Step 20, performing image enhancement processing on the initial license plate image to obtain an enhanced license plate image.
[0067] Optionally, the license plate recognition system performs image enhancement processing on the initial license plate image to obtain an enhanced license plate image, wherein the image enhancement processing includes grayscale processing and smoothing processing. Therefore, the process of performing image enhancement processing on the initial license plate image to obtain an enhanced license plate image includes:
[0068] The license plate recognition system obtains blue parameters, red parameters and green parameters of the initial license plate image.
[0069] Furthermore, the license plate recognition system performs grayscale processing on the initial license plate image using formula (1) to obtain a grayscale image, wherein formula (1) is:
[0070] Gray=0.3560*B+0.5640*G+0.2149*R(1);
[0071] Among them, Gray is the grayscale image, R is the red parameter, G is the green parameter, and B is the blue parameter.
[0072] Furthermore, the license plate recognition system uses formula (2) to smooth the grayscale image to obtain an enhanced license plate image, where formula (2) is:
[0073]
[0074] Where f(x,y) is the Gaussian function value at the point (x,y) in the grayscale image; μ x and μ y is the mean along the x-axis and y-axis; σ x and σ y is the standard deviation along the x-axis and y-axis.
[0075] Step 30, performing color space conversion on the enhanced license plate image to obtain a color space converted license plate image.
[0076] Optionally, the RGB color space consists of three color channels: red (R), green (G), and blue (B), and the value of each channel is usually between 0 and 255. The LAB color space includes a brightness channel (L) and two color channels (A and B), wherein the first color channel (A channel) represents the range from red to green, and the second color channel (B channel) represents the range from yellow to blue.
[0077] Therefore, the license plate recognition system converts the enhanced license plate image in the RGB color space to the LAB color space to obtain the license plate image after LAB color space conversion.
[0078] Step 40, inputting the spatially transformed license plate image into a preset license plate area recognition model to obtain a target license plate recognition area output by the license plate area recognition model.
[0079] In this embodiment, the license plate recognition model is trained based on different sample illumination images under different light and the sample target license plate recognition area calibrated therein, and the license plate area recognition model includes a feature extraction network, a feature clustering network, a feature processing network, and a feature screening network. Therefore, the license plate recognition system inputs the license plate image after spatial conversion into the preset license plate area recognition model to obtain the target license plate recognition area output by the license plate area recognition model, specifically: Step 401, based on the feature extraction network, the first color component and the second color component of each pixel point in the license plate image after color space conversion are extracted through the first color channel and the second color channel of the color space, and a two-dimensional data point set is output.
[0080] Step 402: cluster the two-dimensional data point set based on the feature clustering network and output the initial license plate recognition area.
[0081] In this embodiment, the first color component and the second color component of each pixel in the license plate image after LAB color space conversion are extracted based on the first color channel and the second color channel of the LAB color space based on the feature extraction network, a two-dimensional data point set is constructed, and the two-dimensional data point set is clustered based on the k-means algorithm to determine the initial license plate recognition area of the enhanced license plate image.
[0082] Before clustering the two-dimensional data point set based on the k-means algorithm, it includes: based on the first color channel of the LAB color space, determining the histogram features of the color histogram of the first color channel of the license plate image after the LAB color space conversion, the histogram features include the number and position of the maximum values; based on the second color channel of the LAB color space, determining the histogram features of the color histogram of the second color channel of the license plate image after the LAB color space conversion; determining the number of clusters of the k-means algorithm as the number of maximum values of the color histogram of the first color channel, and based on the histogram features of the color histogram of the first color channel and the histogram features of the color histogram of the second color channel, determining the cluster center of the k-means algorithm, and constructing a two-dimensional data point set can be used as the basis for the number of clusters and cluster centers of the k-means algorithm. The specific process can be:
[0083] First, find the number m and position of the maximum value of the color histogram of the first color channel (a i ,k i )(i=1,2...m), and then find the number n and position of the maximum values of the color histogram of the second color channel (b j ,k j )(j=1,2...n). Since the initial license plate recognition area mainly occupies the first color channel, the number of maximum values of the color histogram of the first color channel m is taken as the number of clusters; the initial cluster center (a i ,b j) There are m×n of them, and m of them are selected as the initial cluster centers.
[0084] The specific steps to obtain the maximum value of the color histogram of each channel are:
[0085] Obtain the color histogram of each channel respectively, the x-axis of the histogram represents the pixel value, and the y-axis represents the number of pixels;
[0086] The fitting curve of the color histogram of each channel is obtained by smooth fitting, and the maximum and minimum values of the fitting curve are obtained;
[0087] For the first maximum value of the fitting curve, search for the maximum value of the color histogram in the interval from the beginning of the color histogram to the first minimum value of the fitting curve, and use this as the maximum value of the color histogram in this interval; for the last maximum value of the fitting curve, search for the maximum value of the color histogram in the interval from the last minimum value of the fitting curve to the end of the color histogram, and use this as the maximum value of the color histogram in this interval; for the remaining maxima of the fitting curve, search for the maximum value of the color histogram in the interval from the previous minimum value to the next minimum value of the maximum value, and use this as the maximum value of the color histogram in this interval.
[0088] To be determined initial cluster center (a i ,b j ) There are m×n, from which m are selected as the initial cluster centers, including:
[0089] Select (a m ,b n ) as the first initial cluster center;
[0090] Select (a1, b1) which is farthest from the first initial cluster center as the second initial cluster center;
[0091] If the number of clusters is greater than 2, then start from a=a i Select a point on the line (i=2,3...m-1) as the next initial cluster center, so that the distance between this point and other cluster centers is the farthest; repeat this step until all cluster centers are selected.
[0092] After determining the cluster center and the number of clusters, the two-dimensional data point set is clustered based on the k-means algorithm to determine the initial license plate recognition area of the enhanced license plate image.
[0093] Step 403, based on the feature processing network, the stuck license plates in the initial license plate recognition area are separated to obtain the license plate contour, and based on the average value of the distance between the vertices of the convex hull in the license plate contour, the pseudo edges in the license plate contour are removed to output the real edge of the license plate.
[0094] In this embodiment, the adhering license plates in the initial license plate recognition area are separated by a watershed algorithm based on a feature processing network to obtain a license plate contour, and based on the average value of the distances between the vertices of the convex hull in the license plate contour, the pseudo edges in the license plate contour are removed to output the real edges of the license plate, specifically including: converting the initial license plate recognition area into a distance transformation map by distance transformation based on the feature processing network, and normalizing the distance transformation map to obtain a normalized distance transformation map; taking the area in the normalized distance transformation map with brightness greater than a preset brightness threshold as the internal area of the initial license plate recognition area; marking the internal area, and marking the external area outside the internal area; guiding the marked areas to separate the adhering license plates to obtain the license plate contour.
[0095] Use the watershed algorithm to separate the stuck license plates in the initial license plate recognition area, including:
[0096] The binary image of the initial license plate recognition area is converted into a distance transformation map through distance transformation and normalized; the area in the normalized distance transformation map with brightness greater than the set threshold is used as the initial license plate recognition area for internal marking; the binary image of the initial license plate recognition area is expanded, and the internal marked area is subtracted and recorded as the unknown area, and the rest is used as the external mark. The watershed algorithm is guided by the marked areas to complete the separation of the adhesion license plates. The normalization calculation formula of the distance transformation map is:
[0097]
[0098] Among them, d(m,n) is the initial distance transformation map, d norm (m,n) is the grayscale value of the pixel at (m,n) in the normalized distance transformation map, d min (m,n) and d max (m,n) are the maximum grayscale value and the minimum grayscale value of the distance transform image before normalization.
[0099] Combined with the average distance between each vertex of the convex hull of the license plate edge, the pseudo edges of each initial license plate recognition area after separation are removed to obtain the true edge of the license plate, including: using the Canny edge detection algorithm to obtain the edge of the initial license plate recognition area after separation; using the wrapping method to obtain the convex hull of the edge of the initial license plate recognition area, and calculating the distance between two adjacent vertices of the convex hull; taking the average of the distances between all vertices as a threshold. If the distance between two adjacent vertices is greater than the threshold, it indicates that the edge segment is a pseudo edge and needs to be removed; if the distance between two vertices is less than or equal to the threshold, it indicates that the edge segment is a true edge and is retained. After removing the pseudo edge, the true edge of the license plate is obtained.
[0100] Step 404, based on the feature screening network, the minimum circumscribed rectangle of the circle is fitted to the real edge of the license plate using the least squares method to obtain multiple license plate candidate frames, and the multiple license plate candidate frames are screened based on the intersection and union comparison to output the target license plate recognition area.
[0101] Intersection over Union (IoU) is a measure of the degree of overlap between two regions and is often used in object detection to evaluate the match between the predicted box and the true box. The value of IoU ranges from 0 (no overlap) to 1 (complete overlap).
[0102] For each candidate box, calculate the IoU value between it and the true box. This usually involves calculating the intersection and union of two rectangular areas, and then finding the ratio of the intersection area to the union area.
[0103] Candidate boxes are screened based on the IoU value. A threshold is set, and only when the IoU value between the candidate box and the real box is greater than the threshold, the candidate box is considered to be a valid target license plate recognition area.
[0104] Set the IOU threshold and calculate the IOU between the candidate boxes. If it is greater than the IOU threshold, it is considered to be a target, and the mean of the coordinates of these candidate boxes is used as the coordinate output of the predicted box.
[0105] This embodiment reduces the impact of complex environments and improves the accuracy of recognizing license plate targets from images.
[0106] Step 50, input the target license plate recognition area into a preset license plate number recognition model to obtain the license plate number output by the license plate number recognition model.
[0107] Optionally, the license plate recognition system inputs the target license plate recognition area into a preset license plate number recognition model to obtain the license plate number output by the license plate number recognition model, wherein the license plate number recognition model is trained based on sample license plate numbers and their corresponding characters. Therefore, the license plate number recognition model can analyze the characters in the target license plate recognition area to obtain the license plate number of the target license plate recognition area.
[0108] The embodiment of the present invention obtains a license plate area recognition model by training different sample illumination images under different light and their calibrated sample target license plate recognition areas, thereby increasing the robustness of the license plate area recognition model, and then processes the initial license plate image through image enhancement processing and color space conversion to obtain a high-quality processed license plate image. Therefore, the highly robust license plate area recognition model is combined with the high-quality processed license plate image to perform license plate recognition, so that the license plate number of the initial license plate image can be accurately obtained, thereby improving the license plate recognition precision and accuracy.
[0109] See also Figure 2 , Figure 2 A schematic diagram of the structure of a license plate recognition system based on big data license plate samples provided by an embodiment of the present invention, wherein the license plate recognition system based on big data license plate samples comprises:
[0110] An acquisition module 201 is used to acquire an initial license plate image to be recognized;
[0111] An image enhancement processing module 202 is used to perform image enhancement processing on the initial license plate image to obtain an enhanced license plate image;
[0112] A color space conversion module 203 is used to perform color space conversion on the enhanced license plate image to obtain a color space converted license plate image;
[0113] The first recognition module 204 is used to input the spatially transformed license plate image into a preset license plate area recognition model to obtain a target license plate recognition area output by the license plate area recognition model; the license plate recognition model is trained based on different sample illumination images under different light and their calibrated sample target license plate recognition areas;
[0114] The second recognition module 205 is used to input the target license plate recognition area into a preset license plate number recognition model to obtain the license plate number output by the license plate number recognition model.
[0115] The license plate recognition system based on big data license plate samples provided by an embodiment of the present invention obtains a license plate area recognition model by training different sample illumination images under different light and their calibrated sample target license plate recognition areas, thereby increasing the robustness of the license plate area recognition model, and then processes the initial license plate image through image enhancement processing and color space conversion to obtain a high-quality processed license plate image. Therefore, the highly robust license plate area recognition model is combined with the high-quality processed license plate image to perform license plate recognition, so that the license plate number of the initial license plate image can be accurately obtained, thereby improving the license plate recognition precision and accuracy.
[0116] See also Figure 3 , Figure 3 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 3 As shown, an embodiment of the present invention provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320. When the processor 320 executes the computer program 311, the following steps are implemented:
[0117] Obtaining an initial license plate image to be recognized;
[0118] Performing image enhancement processing on the initial license plate image to obtain an enhanced license plate image;
[0119] Performing color space conversion on the enhanced license plate image to obtain a color space converted license plate image;
[0120] Input the spatially transformed license plate image into a preset license plate area recognition model to obtain a target license plate recognition area output by the license plate area recognition model; the license plate recognition model is trained based on different sample illumination images under different light and their calibrated sample target license plate recognition areas;
[0121] The target license plate recognition area is input into a preset license plate number recognition model to obtain the license plate number output by the license plate number recognition model.
[0122] See also Figure 4 , Figure 4 Schematic diagram of an embodiment of a computer-readable storage medium provided in an embodiment of the present invention. Figure 4 As shown, this embodiment provides a computer-readable storage medium 400, on which a computer program 411 is stored. When the computer program 411 is executed by a processor, the following steps are implemented:
[0123] Obtaining an initial license plate image to be recognized;
[0124] Performing image enhancement processing on the initial license plate image to obtain an enhanced license plate image;
[0125] Performing color space conversion on the enhanced license plate image to obtain a color space converted license plate image;
[0126] Input the spatially transformed license plate image into a preset license plate area recognition model to obtain a target license plate recognition area output by the license plate area recognition model; the license plate recognition model is trained based on different sample illumination images under different light and their calibrated sample target license plate recognition areas;
[0127] The target license plate recognition area is input into a preset license plate number recognition model to obtain the license plate number output by the license plate number recognition model.
[0128] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0129] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0130] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0131] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0132] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0133] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0134] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A license plate recognition method based on big data license plate samples, characterized in that: include: Obtaining an initial license plate image to be recognized; Performing image enhancement processing on the initial license plate image to obtain an enhanced license plate image; Performing color space conversion on the enhanced license plate image to obtain a color space converted license plate image; Inputting the spatially transformed license plate image into a preset license plate area recognition model to obtain a target license plate recognition area output by the license plate area recognition model; The license plate recognition model is obtained by training based on different sample illumination images under different light conditions and their calibrated sample target license plate recognition areas; The target license plate recognition area is input into a preset license plate number recognition model to obtain the license plate number output by the license plate number recognition model.
2. The license plate recognition method based on big data license plate samples according to claim 1 is characterized in that: The performing image enhancement processing on the initial license plate image to obtain an enhanced license plate image includes: Obtaining blue parameters, red parameters and green parameters of the initial license plate image; Using formula (1) to grayscale the initial license plate image, a grayscale image is obtained; The grayscale image is smoothed using formula (2) to obtain the enhanced license plate image.
3. The license plate recognition method based on big data license plate samples according to claim 2 is characterized in that: The formula (1) is: Gray=0.3560*B+0.5640*G+0.2149*R(1); Wherein, Gray is the grayscale image, R is the red parameter, G is the green parameter, and B is the blue parameter; The formula (2) is: Wherein, f(x, y) is the Gaussian function value at the point (x, y) in the grayscale image; μ x and μ y is the mean along the x-axis and y-axis; σ x and σ y is the standard deviation along the x-axis and y-axis.
4. The license plate recognition method based on big data license plate samples according to claim 1 is characterized in that: The license plate area recognition model includes a feature extraction network, a feature clustering network, a feature processing network and a feature screening network; The step of inputting the spatially transformed license plate image into a preset license plate area recognition model to obtain a target license plate recognition area output by the license plate area recognition model includes: Based on the feature extraction network, the first color component and the second color component of each pixel in the license plate image after the color space conversion are extracted through the first color channel and the second color channel of the color space, and a two-dimensional data point set is output; Clustering the two-dimensional data point set based on the feature clustering network, and outputting an initial license plate recognition area; Separating the adhered license plates in the initial license plate recognition area based on the feature processing network to obtain a license plate contour, and removing the pseudo edges in the license plate contour based on the average distance between the vertices of the convex hull in the license plate contour to output the real edge of the license plate; Based on the feature screening network, the minimum circumscribed rectangle of the circle is fitted to the real edge of the license plate using the least squares method to obtain multiple license plate candidate frames, and the multiple license plate candidate frames are screened based on intersection and union comparison to output the target license plate recognition area.
5. The license plate recognition method based on big data license plate samples according to claim 4 is characterized in that: The license plate area recognition model also includes a cluster center determination network; The method further comprises: clustering the two-dimensional data point set based on the feature clustering network and outputting the initial license plate recognition area. Determine the first color channel of the color space through the network based on the cluster center, determine the histogram features of the first color channel color histogram of the license plate image after the color space conversion, the histogram features including the number and position of maximum values; Based on the second color channel of the color space, determining a histogram feature of a color histogram of the second color channel of the license plate image after the color space conversion; The number of clusters is the number of maximum values of the color histogram of the first color channel, and the cluster center is determined based on the histogram features of the color histogram of the first color channel and the histogram features of the color histogram of the second color channel.
6. The license plate recognition method based on big data license plate samples according to claim 4 is characterized in that: The step of separating the adhered license plates in the initial license plate recognition area based on the feature processing network to obtain a license plate contour includes: Based on the feature processing network, the initial license plate recognition area is converted into a distance transformation map through distance transformation, and the distance transformation map is normalized to obtain a normalized distance transformation map; The area in the normalized distance transformation image whose brightness is greater than a preset brightness threshold is used as the inner area of the initial license plate recognition area; marking the inner area, and marking the outer area outside the inner area; The marked regions are guided to separate the adhered license plates to obtain the license plate outline.
7. The license plate recognition method based on big data license plate samples according to claim 6 is characterized in that: The calculation formula for normalizing the distance transformation graph is: Among them, d(m,n) is the initial distance transformation map, d norm (m,n) is the gray value of the pixel at (m,n) in the normalized distance transformation map, d min (m,n) and d max (m,n) are the maximum grayscale value and the minimum grayscale value of the distance transform image before normalization.
8. The license plate recognition method based on big data license plate samples according to claim 4 is characterized in that: The method of removing the pseudo edge in the license plate contour based on the average distance between the vertices of the convex hull in the license plate contour and outputting the real edge of the license plate includes: Determine the convex hull of the edge of the license plate contour by a wrapping method based on the feature processing network, and calculate the distance between two adjacent vertices of the convex hull; When the distance between two adjacent vertices of the convex hull is greater than a preset vertex threshold, determining that the edge segment of the convex hull is a pseudo edge; The pseudo edge is removed to obtain the real edge of the license plate.
9. The license plate recognition method based on big data license plate samples according to claim 4 is characterized in that: The screening of the plurality of license plate candidate frames based on intersection-and-union comparison and outputting the target license plate recognition area includes: Calculate the intersection-over-union (IOU) value between the license plate candidate frames based on the feature screening network; A license plate candidate frame whose IOU value is greater than a preset IOU threshold is determined from the multiple license plate candidate frames as the target license plate recognition area.
10. A license plate recognition system based on big data license plate samples, characterized in that: include: An acquisition module, used for acquiring an initial license plate image to be recognized; An image enhancement processing module is used to perform image enhancement processing on the initial license plate image to obtain an enhanced license plate image; A color space conversion module, used for performing color space conversion on the enhanced license plate image to obtain a color space converted license plate image; A first recognition module, used for inputting the spatially transformed license plate image into a preset license plate area recognition model to obtain a target license plate recognition area output by the license plate area recognition model; The license plate recognition model is obtained by training based on different sample illumination images under different light conditions and their calibrated sample target license plate recognition areas; The second recognition module is used to input the target license plate recognition area into a preset license plate number recognition model to obtain the license plate number output by the license plate number recognition model.