License plate image recognition method and device, electronic equipment and storage medium

By calculating the fuzzy value of the license plate image from four recognition directions and performing correction processing, problems such as tilt, noise, and occlusion in the license plate image are solved, and the accuracy and robustness of license plate recognition are improved.

CN120808324APending Publication Date: 2025-10-17BEIJING TSINGMICRO INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510895966.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

The presence of blurred images such as tilt, noise, and occlusion in license plate images makes license plate recognition difficult and leads to poor recognition performance.

Method used

The license plate image is fuzzy judged from four recognition directions (vertical, horizontal, first diagonal, and second diagonal), the gradient value is calculated, and correction processing is performed based on the fuzzy value to obtain the target license plate image and perform recognition.

Benefits of technology

The accuracy and robustness of license plate image recognition are improved, and the adaptability in complex environments is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120808324A_ABST
    Figure CN120808324A_ABST
Patent Text Reader

Abstract

The invention provides a license plate image recognition method and device, electronic equipment and a storage medium, and the method comprises the steps: carrying out the fuzzy judgment of a license plate image from four recognition directions, and obtaining the gradient values of the four recognition directions, the four recognition directions comprise a vertical direction, a horizontal direction, a first diagonal direction and a second diagonal direction, calculating a fuzzy value of the license plate image according to the gradient values of the four recognition directions, performing correction processing on the license plate image according to the four vertex angle coordinates of the license plate image under the condition that the fuzzy degree represented by the fuzzy value does not exceed a preset fuzzy degree, obtaining a target license plate image, and recognizing the target license plate image. And performing fuzzy judgment on the license plate image from four recognition directions, calculating the fuzzy value of the license plate image, determining the target license plate image, and recognizing the target license plate image to obtain the recognition result of the target license plate, thereby improving the accuracy of license plate image recognition.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of image processing, and particularly relates to a license plate image recognition method and device, electronic equipment and a storage medium. BACKGROUND

[0002] With the development of intelligent transportation, license plate recognition has become an important means of traffic and vehicle management, and plays an increasingly important role in vehicle management and traffic monitoring. License plate recognition is a mature but imperfect technology.

[0003] The blur images such as inclination, noise and occlusion existing in the license plate image bring certain difficulties to the recognition of the license plate image. Therefore, how to improve the recognition performance of the license plate image is a problem to be solved at present. SUMMARY

[0004] The present disclosure provides a license plate image recognition method and device, electronic equipment and a storage medium to solve the problems in the related art. The license plate image is judged from four recognition directions, the blur value of the license plate image is calculated based on the gradient values of the four recognition directions, and the target license plate image is determined based on the blur value of the license plate image. The target license plate image is recognized to obtain the recognition result of the target license plate, thereby improving the accuracy of license plate image recognition.

[0005] According to a first aspect of the present disclosure, a license plate image recognition method is provided, the method comprising:

[0006] The license plate image is judged from four recognition directions to obtain gradient values of the four recognition directions respectively, wherein the four recognition directions include a vertical direction, a horizontal direction, a first diagonal direction and a second diagonal direction;

[0007] The blur value of the license plate image is calculated according to the gradient values of the four recognition directions;

[0008] In a case where the blur degree represented by the blur value does not exceed a preset blur degree, the license plate image is corrected according to the four corner coordinates of the license plate in the license plate image to obtain a target license plate image;

[0009] The target license plate image is recognized to obtain a recognition result of the target license plate.

[0010] In some embodiments of the present disclosure, the license plate image is judged from the four recognition directions to obtain the gradient values of the four recognition directions respectively, comprising:

[0011] The gray-scale image corresponding to the license plate image is respectively convolved with the convolution kernel of each of the four recognition directions to obtain the gradient values of the four recognition directions respectively.

[0012] The gradient values of the four identification directions include a first gradient value, a second gradient value, a third gradient value, and a fourth gradient value.

[0013] In some embodiments of the present disclosure, the calculation of the blur value of the license plate image according to the gradient values of the four identification directions includes:

[0014] determining the length and width of the license plate image;

[0015] calculating the length and width of the license plate image, the first gradient value, the second gradient value, the third gradient value, and the fourth gradient value via a preset blur value formula to obtain the blur value of the license plate image.

[0016] In some embodiments of the present disclosure, the correction processing of the license plate image according to the four corner coordinates of the license plate in the license plate image to obtain a target license plate image includes:

[0017] determining a maximum width and a maximum height according to the four corner coordinates of the license plate in the license plate image;

[0018] performing image correction on the license plate image according to the maximum width and the maximum height with the top-left corner coordinate of the license plate image as the origin to obtain a corrected license plate image;

[0019] performing perspective transformation processing on the corrected license plate image to obtain the target license plate image.

[0020] In some embodiments of the present disclosure, after the correction processing of the license plate image according to the four corner coordinates of the license plate in the license plate image to obtain a target license plate image, the method further includes:

[0021] judging whether the type of the target license plate image is a multi-layer license plate;

[0022] if it is determined that the type of the target license plate image is a multi-layer license plate, performing segmentation on the target license plate image according to the size layout rule of the multi-layer license plate to obtain a first target license plate sub-image and a second target license plate sub-image;

[0023] adjusting the size information of the first target license plate sub-image to be the same size as the size information of the second target license plate sub-image to obtain an adjusted first target license plate sub-image;

[0024] splicing the adjusted first target license plate sub-image and the second target license plate sub-image to obtain a spliced target license plate image.

[0025] In some embodiments of the present disclosure, the identifying the target license plate image to obtain a recognition result of the target license plate comprises:

[0026] The identified target license plate image is identified to obtain a recognition result of the target license plate. In some embodiments of the present disclosure, when it is determined that the blur value represents a blur degree that does not exceed a preset blur degree, the license plate image is corrected according to the four corner coordinates of the license plate in the license plate image to obtain a target license plate image, comprising:

[0027] The single-layer target license plate image is identified to obtain a recognition result of the target license plate.

[0028] In some embodiments of the present disclosure, after the target license plate image is identified to obtain a recognition result of the target license plate, the method further comprises:

[0029] The confidence of the recognition result of the target license plate is determined by performing a confidence judgment on each character in the recognition result of the target license plate.

[0030] When it is determined that the confidence exceeds a preset confidence threshold, it is determined that the recognition result of the target license plate is successful.

[0031] When it is determined that the confidence does not exceed the preset confidence threshold, it is determined that the recognition result of the target license plate fails.

[0032] According to the second aspect of the present disclosure, a license plate image recognition device is provided, which comprises:

[0033] A blur judgment unit is configured to perform blur judgment on the license plate image from four identification directions to obtain gradient values of the four identification directions, respectively, wherein the four identification directions include a vertical direction, a horizontal direction, a first diagonal direction and a second diagonal direction.

[0034] A calculation unit is configured to calculate a blur value of the license plate image according to the gradient values of the four identification directions.

[0035] A correction unit is configured to, when it is determined that the blur value represents a blur degree that does not exceed a preset blur degree, correct the license plate image according to the four corner coordinates of the license plate in the license plate image to obtain a target license plate image.

[0036] An identification unit is configured to identify the target license plate image to obtain a recognition result of the target license plate.

[0037] In some embodiments of the present disclosure, the blur judgment unit is further configured to perform convolution calculation on the gray-scale image corresponding to the license plate image and four respective convolution kernels corresponding to four recognition directions respectively, to obtain gradient values of the four recognition directions respectively.

[0038] The gradient values of the four recognition directions include a first gradient value, a second gradient value, a third gradient value, and a fourth gradient value.

[0039] In some embodiments of the present disclosure, the calculation unit includes:

[0040] The first determination module is configured to determine the length and the width of the license plate image.

[0041] The calculation module is configured to calculate the length and the width of the license plate image, the first gradient value, the second gradient value, the third gradient value, and the fourth gradient value via a preset blur value formula, to obtain a blur value of the license plate image.

[0042] In some embodiments of the present disclosure, the correction unit includes:

[0043] The second determination module is configured to determine a maximum width and a maximum height according to four corner coordinates of the license plate in the license plate image.

[0044] The correction module is configured to perform image correction on the license plate image according to the maximum width and the maximum height, with the top-left corner coordinate of the license plate image as an origin, to obtain a corrected license plate image.

[0045] The processing module is configured to perform perspective transformation processing on the corrected license plate image, to obtain the target license plate image.

[0046] In some embodiments of the present disclosure, the device further includes:

[0047] The first judgment unit is configured to, after the correction unit performs correction processing on the license plate image according to the four corner coordinates of the license plate in the license plate image to obtain a target license plate image, in a case where the blur value indicates that the blur degree does not exceed a preset blur degree, judge whether the target license plate image is a multi-layer license plate.

[0048] The segmentation unit is configured to, when it is determined that the target license plate image is a multi-layer license plate, perform segmentation on the target license plate image according to a size layout rule of the multi-layer license plate, to obtain a first target license plate sub-image and a second target license plate sub-image.

[0049] The adjustment unit is configured to adjust the size information of the first target license plate sub-image to be the same size as the size information of the target second license plate sub-image, to obtain an adjusted first target license plate sub-image.

[0050] splicing unit, configured to splice the adjusted first target license plate sub-image and the second target license plate sub-image to obtain a spliced target license plate image.

[0051] In some embodiments of the present disclosure, the identification unit is further configured to identify the spliced target license plate image to obtain an identification result of the target license plate.

[0052] In some embodiments of the present disclosure, the first judging unit is further configured to identify the single-layer target license plate image to obtain an identification result of the target license plate.

[0053] In some embodiments of the present disclosure, the apparatus further includes:

[0054] a second judging unit, configured to, after the identification unit identifies the target license plate image to obtain an identification result of the target license plate, judge the confidence of each character in the identification result of the target license plate to obtain a confidence of the identification result of the target license plate;

[0055] a first determining unit, configured to, in a case where the confidence is determined to exceed a preset confidence threshold, determine that the identification result of the target license plate is successful;

[0056] a second determining unit, configured to, in a case where the confidence is determined to not exceed the preset confidence threshold, determine that the identification result of the target license plate is failed.

[0057] According to a third aspect of the present disclosure, an electronic device is provided, including:

[0058] at least one processor; and

[0059] a memory connected with the at least one processor in communication; wherein

[0060] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of the first aspect of the present disclosure.

[0061] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method of the first aspect of the present disclosure.

[0062] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program which, when executed by a microprocessor, implements the method of the first aspect of the present disclosure.

[0063] In summary, the method and device for recognizing license plate image, the electronic device and the storage medium provided by the present disclosure include: judging the blur of the license plate image from four recognition directions, and obtaining gradient values of the four recognition directions, wherein the four recognition directions include: a vertical direction, a horizontal direction, a first diagonal direction and a second diagonal direction; calculating a blur value of the license plate image according to the gradient values of the four recognition directions; when it is determined that the blur degree represented by the blur value does not exceed a preset blur degree, performing a correction process on the license plate image according to four corner coordinates of the license plate image to obtain a target license plate image; and performing recognition on the target license plate image to obtain a recognition result of the target license plate. The present disclosure judges the blur of the license plate image from four recognition directions, and obtains gradient values of the four recognition directions, wherein the four recognition directions include: a vertical direction, a horizontal direction, a first diagonal direction and a second diagonal direction; calculates a blur value of the license plate image according to the gradient values of the four recognition directions; when it is determined that the blur degree represented by the blur value does not exceed a preset blur degree, performs a correction process on the license plate image according to four corner coordinates of the license plate image to obtain a target license plate image; and performs recognition on the target license plate image to obtain a recognition result of the target license plate. The blur of the license plate image is judged from four recognition directions, the blur value of the license plate image is calculated based on the gradient values of the four recognition directions, and the target license plate image is determined based on the blur value of the license plate image, and the target license plate image is recognized to obtain the recognition result of the target license plate, thereby improving the accuracy of license plate image recognition.

[0064] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0065] The accompanying drawings are used to better understand the present scheme and do not limit the present disclosure. Among them:

[0066] Figure 1 A flowchart of a license plate image recognition method provided by an embodiment of the present disclosure;

[0067] Figure 2 A flowchart of another license plate image recognition method provided by an embodiment of the present disclosure;

[0068] Figure 3 A flowchart of another license plate image recognition method provided by an embodiment of the present disclosure;

[0069] Figure 4 A flowchart of another license plate image recognition method provided by an embodiment of the present disclosure;

[0070] Figure 5A flowchart of another method for recognizing a license plate image provided by an embodiment of the present disclosure is shown in FIG. 6.

[0071] Figure 6 A flowchart of another method for recognizing a license plate image provided by an embodiment of the present disclosure is shown in FIG. 6.

[0072] Figure 7 A structural schematic diagram of a license plate image recognition device provided by an embodiment of the present disclosure is shown in FIG. 7.

[0073] Figure 8 A structural schematic diagram of another license plate image recognition device provided by an embodiment of the present disclosure is shown in FIG. 8.

[0074] Figure 9 A schematic block diagram of an example electronic device 900 provided by an embodiment of the present disclosure is shown in FIG. 9. DETAILED DESCRIPTION

[0075] Embodiments of the present disclosure are described in detail below with reference to the accompanying drawings, examples of which are shown in the drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present disclosure, and cannot be understood as a limitation of the present disclosure.

[0076] With the development of intelligent transportation, license plate recognition has become an important means of traffic and vehicle management, and plays an increasingly important role in vehicle management and traffic monitoring. License plate recognition is a mature but imperfect technology.

[0077] There are blurred images such as inclination, noise, and occlusion in license plate images, which brings certain difficulties to recognizing the license plate image. Therefore, how to improve the recognition performance of the license plate image is a problem to be solved at present.

[0078] Therefore, in order to solve the problems in the related art, the present disclosure provides a method for recognizing a license plate image, which includes making a blur judgment on the license plate image from four recognition directions to obtain gradient values of the four recognition directions, wherein the four recognition directions include a vertical direction, a horizontal direction, a first diagonal direction, and a second diagonal direction; calculating a blur value of the license plate image according to the gradient values of the four recognition directions; when it is determined that the blur degree represented by the blur value does not exceed a preset blur degree, performing a correction process on the license plate image according to four corner coordinates of the license plate image to obtain a target license plate image; and performing recognition on the target license plate image to obtain a recognition result of the target license plate.

[0079] The scheme of the present disclosure obtains gradient values of four recognition directions by fuzzy judgment of the license plate image from the four recognition directions, wherein the four recognition directions include a vertical direction, a horizontal direction, a first diagonal direction and a second diagonal direction, calculates the blur value of the license plate image according to the gradient values of the four recognition directions, in the case where the blur degree represented by the blur value does not exceed a preset blur degree, corrects the license plate image according to the four corner coordinates of the license plate in the license plate image to obtain a target license plate image, identifies the target license plate image to obtain the identification result of the target license plate, judges the license plate image from the four recognition directions, calculates the blur value of the license plate image based on the gradient values of the four recognition directions, and determines the target license plate image based on the blur value of the license plate image, identifies the target license plate image to obtain the identification result of the target license plate, thereby improving the accuracy of license plate image identification.

[0080] The embodiments of the present disclosure are not exhaustive, but are only a part of the embodiments, and are not specific limitations on the protection scope of the present disclosure. In the case where there is no contradiction, each step in an embodiment can be implemented as an independent embodiment, and the steps can be combined arbitrarily, for example, the scheme after removing part of the steps in an embodiment can also be implemented as an independent embodiment, and the order of the steps in an embodiment can be exchanged arbitrarily, in addition, the optional implementation manners in an embodiment can be combined arbitrarily; in addition, the embodiments can be combined arbitrarily, for example, part or all of the steps of different embodiments can be combined arbitrarily, an embodiment can be combined with the optional implementation manners of other embodiments.

[0081] In the embodiments of the present disclosure, the terms and / or descriptions of the embodiments are consistent and can be referred to each other if there is no special description and logical conflict, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationship.

[0082] The terms used in the embodiments of the present disclosure are only for the purpose of describing the specific embodiments, and not as a limitation on the present disclosure.

[0083] In the embodiments of the present disclosure, unless otherwise stated, the elements expressed in singular form, such as "one", "a", "the", "above", "said", "preceding", "this" and the like, can represent "one and only one", or "one or more", "at least one" and the like. For example, in the case of using articles such as "a", "an", "the" and the like in English, the noun after the article can be understood as singular expression, or as plural expression.

[0084] In some embodiments, the terms "in response to", "in response to determining", "in the case of", "when", "when", "if", "if" and the like can be replaced with each other.

[0085] In some embodiments, the terms "greater than", "greater than or equal to", "not less than", "more than", "more than or equal to", "not less than", "higher than", "higher than or equal to", "not lower than", "above" and the like can be replaced with each other, and the terms "less than", "less than or equal to", "not greater than", "less than", "less than or equal to", "not more than", "lower than", "lower than or equal to", "not higher than", "below" and the like can be replaced with each other.

[0086] In the embodiments of the present disclosure, the prefix words "first", "second" and the like are only used to distinguish different description objects, and do not constitute limitation on the position, order, priority, quantity or content of the description objects. The description of the description objects should refer to the description in the context of the claims or embodiments, and should not constitute redundant limitation because of the use of the prefix words.

[0087] In the embodiments of the present disclosure, "a plurality of" means two or more.

[0088] In the embodiments of the present disclosure, the terms "import", "input", "read in" and the like can be replaced with each other.

[0089] In some embodiments, the apparatus and the like can be interpreted as physical or virtual, and the name thereof is not limited to the name described in the embodiments. The terms "apparatus", "equipment", "device", "circuit", "network element", "node", "function", "unit", "section", "system", "network", "chip", "chip system", "entity", "subject" and the like can be replaced with each other.

[0090] In some embodiments, the terms "terminal," "terminal device," "user equipment" (UE), "user terminal," "mobile station" (MS), "mobile terminal" (MT), subscriber station, mobile unit, subscriber unit, wireless unit, remote unit, mobile device, wireless device, wireless communication device, remote device, mobile subscriber station, access terminal, mobile terminal, wireless terminal, remote terminal, handset, user agent, mobile client, client, and the like can be used interchangeably.

[0091] Figure 1 A flowchart of a license plate image recognition method provided by embodiments of the present disclosure is suitable for scenarios requiring license plate image recognition, such as vehicle snapshot at parking lot entrance and exit, road portal, toll station, and the like, as shown in FIG. 1. The license plate image recognition method includes steps 101-104. Figure 1

[0092] In embodiments of the present disclosure, the license plate image refers to a rectangular image containing a license plate, which is usually obtained by intercepting after license plate detection on a frame of image.

[0093] Step 101: performing fuzzy judgment on the license plate image from four recognition directions to obtain gradient values of the four recognition directions, respectively, wherein the four recognition directions include a vertical direction, a horizontal direction, a first diagonal direction, and a second diagonal direction.

[0094] In embodiments of the present disclosure, performing fuzzy judgment on the license plate image from four recognition directions specifically refers to performing gradient value calculation on the license plate image from the four recognition directions of the vertical direction, the horizontal direction, the first diagonal direction, and the second diagonal direction to obtain gradient values corresponding to the four recognition directions, respectively.​

[0095] By calculating the gradient values of the four directions, the distribution change of the gradient at different angles is captured, the blurring degree of the image can be quantified, and the adaptability of the license plate image in a complex scene is enhanced.

[0096] In step 102, a blurring value of the license plate image is calculated according to the gradient values of the four identification directions.

[0097] In the embodiments of the present disclosure, the blurring value represents a quantitative indicator of the blurring degree of the license plate image. The lower the blurring value, the more blurred the license plate image. The higher the blurring value, the clearer the license plate image. The blurring value is calculated according to the gradient values corresponding to the four identification directions, i.e., the vertical direction, the horizontal direction, the first diagonal direction, and the second diagonal direction. It should be noted that in actual applications, the lower the blurring value, the clearer the license plate image, and the higher the blurring value, the more blurred the license plate image.

[0098] The blurring value of the license plate image is calculated according to the gradient values of the four identification directions, which can quantitatively evaluate the quality of the license plate image and comprehensively capture the integrity and clarity of the license plate image information.

[0099] In step 103, when it is determined that the blurring degree represented by the blurring value does not exceed a preset blurring degree, the four corner coordinates of the license plate in the license plate image are used to perform correction processing on the license plate image to obtain a target license plate image.

[0100] In the embodiments of the present disclosure, the preset blurring degree is used as a dividing line to distinguish whether the license plate image needs to be corrected. When the blurring degree of the license plate image does not exceed the preset blurring degree, the four corner coordinates of the license plate in the license plate image are determined. The four corner coordinates of the license plate are the coordinate positions of the top-left corner, the top-right corner, the bottom-right corner, and the bottom-left corner of the license plate frame in the image coordinate system in the original state of the license plate image. The coordinate positions can determine the geometric shape of the license plate in the license plate image. The four corner coordinates of the license plate are used to perform correction processing on the license plate image to obtain a target license plate image.

[0101] As described above, the blurring degree is quantified by blurring, so the calculated blurring value of the license plate image can be compared with a preset blurring threshold to accurately screen the license plate image that needs to be processed. The four corner coordinates are used to locate the geometric features of the license plate in the license plate image, and the license plate image is subjected to targeted correction processing to effectively correct the inclination angle of the license plate in the license plate image, repair perspective distortion, and other problems, so that the license plate in the license plate image returns to the standard shape, thereby obtaining a target license plate image, and improving the robustness and accuracy of license plate image recognition in a complex environment.

[0102] As an implementation manner of the embodiment of the present disclosure, the greater the blur value of the license plate image, the lower the blur degree of the license plate image. The blur value is compared with a first blur threshold value preset in advance. If the blur value is greater than the first blur threshold value, the blur degree does not exceed the preset blur degree.

[0103] As another implementation manner of the embodiment of the present disclosure, the smaller the blur value of the license plate image, the lower the blur degree of the license plate image. The blur value is compared with a second blur threshold value preset in advance. If the blur value is smaller than the first blur threshold value, the blur degree does not exceed the preset blur degree.

[0104] In step 104, the target license plate image is identified to obtain an identification result of the target license plate.

[0105] In the embodiment of the present disclosure, the target license plate image after the correction processing is subjected to image recognition to obtain an identification result of the target license plate image.

[0106] The target license plate image has clear features and standard geometric shapes. By identifying the target license plate image, the license plate information of the target license plate image can be determined, which has practical application value in the fields of intelligent transportation, security monitoring, etc.

[0107] In summary, according to the license plate image identification method provided by the present disclosure, the blur of the license plate image is judged from four identification directions to obtain gradient values of the four identification directions, wherein the four identification directions include a vertical direction, a horizontal direction, a first diagonal direction and a second diagonal direction. The blur value of the license plate image is calculated according to the gradient values of the four identification directions. In the case where the blur degree represented by the blur value does not exceed the preset blur degree, the target license plate image is obtained by correcting the license plate image according to the four corner coordinates of the license plate in the license plate image. The target license plate image is identified to obtain an identification result of the target license plate, thereby improving the accuracy of license plate image identification.

[0108] Taking the license plate image capture of the vehicle at the entrance and exit of the parking lot as an example, the passing vehicles within a preset distance of the camera are monitored in real time. The license plate image is extracted from the collected video frames when the vehicle enters the preset distance range. The size range of the license plate image is configured according to the preset distance range or experience. It is judged whether the size of the license plate image belongs to the configurable size range of the vehicle image. In the case where the size of the license plate image belongs to the configurable size range of the vehicle image, it is further judged whether the aspect ratio of the license plate image conforms to the aspect ratio threshold value specified by the relevant standards. In the case where the aspect ratio of the license plate image conforms to the aspect ratio threshold value specified by the relevant standards, the license plate image is subjected to the blur judgment from the four identification directions to obtain the gradient values of the four identification directions. Figure 1 .

[0109] In order to improve the efficiency of identification, in the case of determining that the size of the license plate image does not belong to the size range of the configurable vehicle image, the license plate image is discarded, and the identification step is not continued.

[0110] Similarly, in the case of determining that the aspect ratio of the license plate image does not conform to the aspect ratio threshold value specified by the relevant standard, the license plate image is discarded, and the identification step is not continued.

[0111] In order to further identify the license plate image, when step 101 is executed, it further includes: respectively convolving the gray scale image corresponding to the license plate image with the convolution kernel of each of the four identification directions to obtain the gradient values of the four identification directions; wherein the gradient values of the four identification directions include first gradient values, second gradient values, third gradient values and fourth gradient values.

[0112] The gray scale image of the license plate image is calculated by a preset algorithm, and the gray scale image of the license plate image is respectively convolved with the convolution kernel of the vertical direction (90 degrees), the horizontal direction (0 degrees), the first diagonal direction (45 degrees) and the second diagonal direction (135 degrees) to obtain the gradient values of the four identification directions, which are represented as first gradient values, second gradient values, third gradient values and fourth gradient values.

[0113] The gray scale value of the gray scale image of the license plate image at coordinates (i, j) is denoted as f(i, j), and the convolution kernel of the vertical direction (90 degrees), the horizontal direction (0 degrees), the first diagonal direction (45 degrees) and the second diagonal direction (135 degrees) is defined as follows:

[0114] 0 degrees: 45 degrees: 90 degrees: 135 degrees:

[0115] The gray scale image corresponding to the license plate image is respectively convolved with the convolution kernel of each of the four identification directions to obtain the gradient values of the four identification directions, and the convolution calculation is shown in formula 1.

[0116]

[0117] G90 i,j is the first gradient value of the vertical direction (90 degrees), G0 i,j is the second gradient value of the horizontal direction (0 degrees), G45 i,j is the third gradient value of the first diagonal direction (45 degrees), and G135 i,j is the fourth gradient value of the second diagonal direction (135 degrees).

[0118] Figure 2The following further shows a flow chart of a license plate image recognition method proposed in an embodiment of the present disclosure. In order to calculate the fuzzy value of the license plate image, Figure 2 The following steps may be included:

[0119] Step 201: Determine the length and width of the license plate image.

[0120] Step 202 : Calculate the length and width of the license plate image, the first gradient value, the second gradient value, the third gradient value, and the fourth gradient value using a preset fuzzy value formula to obtain a fuzzy value of the license plate image.

[0121] Normalize the gradient values ​​of the four recognition directions (such as using minimum-maximum normalization, standardization, L2 regularization, etc.) so that the gradient values ​​of the four recognition directions are mapped to the same range (such as [0,1]), so that the gradient values ​​of the four recognition directions are comparable. In order to reduce the amount of calculation and speed up the processing speed, and without accelerating the convergence speed of the preset algorithm or preset model, a relatively simpler method is used. The absolute value of the gradient of the four recognition directions is set to 1 if it is greater than the preset gradient threshold, and is set to 0 if it is less than the preset gradient threshold.

[0122] The length w and width h of the license plate image, the first gradient value G90 i,j , the second gradient value G0 i,j , the third gradient value G45 i,j and the fourth gradient value G135 i,j Substitute it into the fuzzy value formula to calculate and get the fuzzy value of the license plate image. In this embodiment, the larger the fuzzy value, the clearer the license plate image. Therefore, if the fuzzy value is greater than the preset fuzzy threshold, it will be retained, and if the fuzzy value is less than the preset fuzzy threshold, it will be discarded. The fuzzy value F of the license plate image value The calculation formula is shown in Formula 2.

[0123]

[0124] By adjusting the first gradient value G90 i,j , the second gradient value G0 i,j , the third gradient value G45 i,j and the fourth gradient value G135 i,j The grayscale images of the license plate images in four directions are averaged pixel by pixel, and then globally averaged to the entire license plate image, eliminating the noise interference of the single-direction gradient and normalizing the characteristic scale of the license plate image. The average of the gradient values ​​in the four directions will eliminate the interference of extreme gradient values.

[0125] Figure 3 The following further shows a flow chart of a license plate image recognition method proposed in an embodiment of the present disclosure. Figure 1 The embodiment shown further explains step 103.Figure 3 The method can comprise the following steps:

[0126] In step 301, the maximum width and the maximum height are determined according to the four corner coordinates of the license plate in the license plate image.

[0127] In the embodiments of the present disclosure, the preset algorithm is changed by detecting a head, wherein the head is the output of the last layer of the preset algorithm, so as to obtain four vertex coordinates, i.e., the upper-left (x1, y1), the upper-right (x2, y2), the lower-right (x3, y3), and the lower-left (x4, y4). The four vertex coordinates are subjected to affine transformation in a clockwise direction to construct a license plate image rect, as shown in formula 3.

[0128] rect = [[x1, y1], [x2, y2], [x3, y3], [x4, y4]] formula 3

[0129] It should be noted that, in addition to the clockwise direction, affine transformation can also be performed in other directions, and the specific direction is not limited.

[0130] The maximum width maxWidth and the maximum height maxHeight are determined according to the license plate image rect, and the maximum width maxWidth and the maximum height maxHeight can correct the license plate image rect to a rectangle that conforms to the license plate image rule, as shown in formula 4 and formula 5.

[0131]

[0132] In step 302, the license plate image is subjected to image correction according to the maximum width and the maximum height with the upper-left corner coordinate of the license plate image as the origin, to obtain a corrected license plate image.

[0133] The license plate image rect is subjected to image correction according to the maximum width maxWidth and the maximum height maxHeight with the upper-left corner coordinate (x1, y1) of the license plate image rect as the origin coordinate, and is mapped to the coordinate system in a clockwise direction, to obtain a corrected license plate image dst, as shown in formula 6.

[0134] dst = [[0, 0], [maxWidth-1, 0], [maxWidth-1, maxHeight-1], [0, maxHeight-1]] formula 6

[0135] Wherein, [0, 0] is the left top corner coordinate of the corrected license plate image, [maxWidth-1, 0] is the right top corner coordinate of the corrected license plate image, [maxWidth-1, maxHeight-1] is the right bottom corner coordinate of the corrected license plate image, and [0, maxHeight-1] is the left bottom corner coordinate of the corrected license plate image.

[0136] In some embodiments, the license plate image rect can also be corrected with the left bottom corner coordinate (x4, y4), the right top corner coordinate (x2, y2), and the right bottom corner coordinate (x3, y3) as the original coordinates, without limitation.

[0137] Step 303: performing perspective transformation on the corrected license plate image to obtain the target license plate image.

[0138] The perspective transformation on the corrected license plate image is performed to obtain the target license plate image, and the perspective transformation is shown in formulas 7 and 8.

[0139] M = cv2.getPerspectiveTransform(rect, dst) Formula 7

[0140] lp_img = cv2.warpPerspective(image, M, (maxWidth, maxHeight)) Formula 8

[0141] Wherein, M represents the storage of the calculated perspective transformation matrix, cv2 is the Open Source Computer Vision Library (OpenCV), which provides a large number of functions and tools for image processing and computer vision tasks, getPerspectiveTransform represents a function in OpenCV for calculating the transformation matrix, which maps any quadrilateral region in the license plate image to a standard rectangle, getPerspectiveTransform(rect, dst) indicates that the license plate image rect and the corrected license plate image dst are input into the getPerspectiveTransform function, warpPerspective is a function in OpenCV for perspective transformation, and the license plate image before correction image, the perspective transformation matrix M, the maximum width maxWidth, and the maximum height maxHeight are input into the warpPerspective function, the license plate correction is realized through the four corner coordinates, and the corrected target license plate image lp_img is obtained.

[0142] In addition to the above formula 7 and formula 8, any other function or model capable of realizing the perspective transformation function in the related art can also be adopted, and therefore will not be described here.

[0143] Figure 4 A flowchart of a license plate image recognition method is proposed for the embodiments of the present disclosure. Based on the embodiments shown in the drawings, Figure 1 Figure 4 may include the following steps:

[0144] Step 401, determine whether the type of the target license plate image is a multi-layer license plate.

[0145] At present, the target license plate image type includes a single-layer target license plate image and a double-layer target license plate image. It is determined whether the target license plate image to be recognized is a single-layer target license plate image or a double-layer target license plate image, so as to prepare for subsequent processing. The double-layer target license plate image refers to a target license plate image having an upper and lower double-row structure.

[0146] If it is determined that the type of the target license plate image is a multi-layer license plate, step 402 is performed. If it is determined that the type of the target license plate image is a single-layer license plate, step 406 is performed.

[0147] Step 402, according to the size layout rule of the multi-layer license plate, the target license plate image is segmented to obtain a first target license plate sub-image and a second target license plate sub-image.

[0148] If it is determined that the type of the target license plate image is a double-layer target license plate image, the target license plate image is segmented according to a 5 / 12 proportion in the y-axis direction as a segmentation boundary to obtain an upper image with a proportion of 5 / 12 and a lower image with a proportion of 7 / 12, which are the first target license plate sub-image and the second target license plate sub-image. For the scenario that the layout proportion of the multi-layer license plate belongs to 5 / 12 and the license plate number belongs to 7 / 12, it is given by the relevant regulations. If other proportions of the layout are given by the relevant regulations, they also belong to the protection scope of the embodiments of the present disclosure.

[0149] Step 403, adjust the size information of the first target license plate sub-image to be the same size as the size information of the second target license plate sub-image to obtain an adjusted first target license plate sub-image.

[0150] The upper image with a proportion of 5 / 12 is adjusted to be the same size as the lower image with a proportion of 7 / 12 to obtain an adjusted first target license plate sub-image.

[0151] Step 404, splice the adjusted first target license plate sub-image and the second target license plate sub-image to obtain a spliced target license plate image.

[0152] ​The adjusted first target license plate sub-image and the lower layer image with an equal height of 7 / 12 are placed in the same horizontal interface, the two images are horizontally spliced, and a spliced target license plate image is obtained.

[0153] In step 405, the spliced target license plate image is identified to obtain an identification result of the target license plate.

[0154] The processing object is determined, the important information of the spliced target license plate image is identified, and a reliable data basis is provided.

[0155] In step 406, a single-layer target license plate image is identified to obtain an identification result of the target license plate.

[0156] Figure 5 A flowchart of a license plate image identification method is provided for the embodiments of the present disclosure. Based on the embodiments shown in the drawings, Figure 1 the embodiments can include the following steps: Figure 5

[0157] In step 501, the confidence of the identification result of the target license plate is determined by performing a confidence judgment on each character in the identification result of the target license plate.

[0158] In the embodiments of the present disclosure, the target license plate image is identified to obtain an identification result of the target license plate. The target license plate image is input into a preset CTC_loss optimization model for network identification. Through a plurality of layer structures, the identification result of the target license plate is finally output through a preset CTC decoding.

[0159] The identification result of the target license plate output by the preset CTC decoding contains a plurality of target license plate images. Each target license plate image contains a preset number of characters. A confidence judgment is performed on each character in the preset number of characters, that is, the recognition probability of each character is calculated. The higher the recognition probability of the character, the higher the confidence. When the minimum confidence character in the preset number of characters is less than a preset confidence threshold, it is considered that the target license plate image identification fails. When the minimum confidence character in the preset number of characters is greater than or equal to the preset confidence threshold, it is considered that the target license plate image identification is successful.

[0160] In step 502, when it is determined that the confidence exceeds the preset confidence threshold, it is determined that the identification result of the target license plate is successful.

[0161] When it is determined that the confidence exceeds the preset confidence threshold, the license plate number meets the rules of the preset design license plate, and it is determined that the license plate recognition is successful.

[0162] In step 503, when it is determined that the confidence does not exceed the preset confidence threshold, it is determined that the identification result of the target license plate fails. ​

[0163] In a case where it is determined that the confidence does not exceed the preset confidence threshold, the license plate number does not satisfy the rule of the preset designed license plate, and it is determined that the license plate recognition fails.

[0164] As shown in FIG. 1, a flowchart of a license plate image recognition method provided by an embodiment of the present disclosure is shown, and the steps s01-s12 include: Figure 6

[0165] s01: In response to receiving a video frame, a license plate image is extracted from the video frame.

[0166] s02: The length and width of the license plate image are determined.

[0167] s03: The length and width of the license plate image, the first gradient value, the second gradient value, the third gradient value, and the fourth gradient value are calculated by a preset blur value formula to obtain a blur value of the license plate image.

[0168] In a case where it is determined that the blur degree represented by the blur value does not exceed the preset blur degree, step s04 is performed, and in a case where it is determined that the blur degree represented by the blur value exceeds the preset blur degree, step s13 is performed.

[0169] s04: The four corner coordinates of the license plate image are determined.

[0170] s05: The maximum width and the maximum height are determined according to the four corner coordinates of the license plate in the license plate image.

[0171] s06: The top-left corner coordinate of the license plate in the license plate image is taken as the origin, and the license plate image is corrected according to the maximum width and the maximum height to obtain a corrected license plate image.

[0172] s07: The corrected license plate image is subjected to perspective transformation processing to obtain a target license plate image.

[0173] s08: It is determined whether the type of the target license plate image is a multi-layer license plate.

[0174] If it is determined to be a multi-layer license plate, step s08a is performed, and if it is determined to be a single-layer license plate, step s08b is performed.

[0175] s08a: The target license plate image is cut according to the size layout rule of the double-layer license plate to obtain a first target license plate sub-image and a second target license plate sub-image.

[0176] s09: The size information of the first target license plate sub-image is adjusted to be the same size as the size information of the second target license plate sub-image to obtain an adjusted first target license plate sub-image.

[0177] ​s10: splicing the adjusted first target license plate sub-image and the second target license plate sub-image to obtain a spliced target license plate image.

[0178] s11: identifying the spliced target license plate image to obtain an identification result of the target license plate.

[0179] s08b: identifying the target license plate image of the single-layer license plate to obtain an identification result of the target license plate.

[0180] s12: judging whether the identification result of the target license plate image exceeds a preset confidence threshold.

[0181] In a case where it is determined that the confidence does not exceed the preset confidence threshold, step s12a is performed, and in a case where it is determined that the confidence exceeds the preset confidence threshold, step s12b is performed.

[0182] s12a: determining that the identification result of the target license plate fails.

[0183] s12b: determining that the identification result of the target license plate succeeds.

[0184] s13: discarding the license plate image whose blur value represents a blur degree exceeding a preset blur degree, and reextracting a license plate image from a video frame.

[0185] For detailed descriptions of steps s01-s13, refer to the related detailed descriptions of the above embodiments.

[0186] Figure 7 A structure diagram of a license plate image recognition device provided by an embodiment of the present disclosure is shown in FIG. 1, which includes a blur judgment unit 71, a calculation unit 72, a correction unit 73, and an identification unit 74. Figure 8

[0187] The blur judgment unit 71 is configured to perform blur judgment on the license plate image from four identification directions to obtain gradient values of the four identification directions, respectively, wherein the four identification directions include a vertical direction, a horizontal direction, a first diagonal direction, and a second diagonal direction.

[0188] The calculation unit 72 is configured to calculate a blur value of the license plate image according to the gradient values of the four identification directions.

[0189] The correction unit 73 is configured to, in a case where it is determined that a blur degree represented by the blur value does not exceed a preset blur degree, perform correction processing on the license plate image according to four corner coordinates of a license plate in the license plate image to obtain a target license plate image.

[0190] The identification unit 74 is configured to identify the target license plate image to obtain an identification result of the target license plate.​

[0191] In summary, the license plate image recognition device provided by the present disclosure includes: judging the blur of the license plate image from four recognition directions, and obtaining gradient values of the four recognition directions, wherein the four recognition directions include: a vertical direction, a horizontal direction, a first diagonal direction, and a second diagonal direction; calculating a blur value of the license plate image according to the gradient values of the four recognition directions; when it is determined that the blur degree represented by the blur value does not exceed a preset blur degree, performing a correction process on the license plate image according to the four corner coordinates of the license plate image to obtain a target license plate image; and performing recognition on the target license plate image to obtain a recognition result of the target license plate. The present disclosure judges the blur of the license plate image from four recognition directions, and obtains gradient values of the four recognition directions, wherein the four recognition directions include: a vertical direction, a horizontal direction, a first diagonal direction, and a second diagonal direction; calculates a blur value of the license plate image according to the gradient values of the four recognition directions; when it is determined that the blur degree represented by the blur value does not exceed a preset blur degree, performs a correction process on the license plate image according to the four corner coordinates of the license plate image to obtain a target license plate image; and performs recognition on the target license plate image to obtain a recognition result of the target license plate. The blur of the license plate image is judged from four recognition directions, the gradient values of the four recognition directions are calculated to obtain the blur value of the license plate image, and the target license plate image is determined based on the blur value of the license plate image, and the target license plate image is recognized to obtain the recognition result of the target license plate, thereby improving the accuracy of license plate image recognition.

[0192] Further, in a possible implementation manner of an embodiment of the present disclosure, as shown in Figure 8 the blur judgment unit 71 is further configured to perform convolution calculation on the gray-scale image corresponding to the license plate image and the convolution kernel of each of the four recognition directions respectively to obtain gradient values of the four recognition directions respectively.

[0193] The gradient values of the four recognition directions include a first gradient value, a second gradient value, a third gradient value, and a fourth gradient value.

[0194] Further, in a possible implementation manner of an embodiment of the present disclosure, as shown in Figure 8 the calculation unit 72 includes:

[0195] A first determination module 7201 is configured to determine the length and width of the license plate image.

[0196] A calculation module 7202 is configured to calculate the length and width of the license plate image, the first gradient value, the second gradient value, the third gradient value, and the fourth gradient value via a preset blur value formula to obtain a blur value of the license plate image.

[0197] Further, in a possible implementation manner of the embodiment of the present disclosure, as shown in Figure 8 The correction unit 73 includes:

[0198] The second determination module 7301 is configured to determine the maximum length and the maximum width according to the four top corner coordinates of the license plate in the license plate image.

[0199] The correction module 7302 is configured to perform image correction on the license plate image according to the maximum length and the maximum width, with the top-left corner coordinate of the license plate image as the origin, to obtain a corrected license plate image.

[0200] The processing module 7303 is configured to perform perspective transformation processing on the corrected license plate image to obtain the target license plate image.

[0201] Further, in a possible implementation manner of the embodiment of the present disclosure, as shown in Figure 8 The device further includes:

[0202] The first judgment unit 75 is configured to judge whether the type of the target license plate image is a multi-layer license plate.

[0203] The cutting unit 76 is configured to, when it is determined that the type of the target license plate image is a multi-layer license plate, perform cutting on the target license plate image according to the size layout rule of the multi-layer license plate to obtain a first target license plate sub-image and a second target license plate sub-image.

[0204] The adjustment unit 77 is configured to adjust the size information of the first target license plate sub-image to be the same size as the size information of the second target license plate sub-image to obtain an adjusted first target license plate sub-image.

[0205] The splicing unit 78 is configured to splice the adjusted first target license plate sub-image and the second target license plate sub-image to obtain a spliced target license plate image.

[0206] Further, in a possible implementation manner of the embodiment of the present disclosure, the recognition unit 74 is further configured to recognize the spliced target license plate image to obtain a recognition result of the target license plate.

[0207] Further, in a possible implementation manner of the embodiment of the present disclosure, as shown in Figure 8 The first judgment unit 75 is further configured to recognize the single-layer target license plate image to obtain a recognition result of the target license plate.

[0208] Further, in a possible implementation manner of the embodiment of the present disclosure, as shown in Figure 8 The device further includes:

[0209] The second determining unit 79 is configured to, after the recognition unit 74 recognizes the target license plate image and obtains a recognition result of the target license plate, determine the confidence of the recognition result of the target license plate by performing confidence determination on each character in the recognition result of the target license plate.

[0210] The first determining unit 710 is configured to, in a case where the confidence exceeds a preset confidence threshold, determine that the recognition result of the target license plate is successful.

[0211] The second determining unit 711 is configured to, in a case where the confidence does not exceed the preset confidence threshold, determine that the recognition result of the target license plate is failed.

[0212] It should be noted that the foregoing explanation and description of the method embodiments are also applicable to the device embodiments of the present disclosure, and the principles are the same, and the device embodiments of the present disclosure are not limited herein.

[0213] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.

[0214] Figure 9 A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.

[0215] As shown in Figure 9 The electronic device 900 includes a computing unit 901 that can perform various appropriate actions and processes in accordance with a computer program stored in a ROM (Read-Only Memory) 902 or a computer program loaded from a storage unit 908 into a RAM (Random Access Memory) 903. Various programs and data required for the operation of the electronic device 900 can also be stored in the RAM 903. The computing unit 1001, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An I / O (Input / Output) interface 905 is also connected to the bus 904.

[0216] A plurality of components in the electronic device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, a speaker, etc.; a storage unit 908, such as a magnetic disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the electronic device 900 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0217] The computing unit 901 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 901 performs various methods and processes described above, such as the method of recognizing license plate images. For example, in some embodiments, the method of recognizing license plate images can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded to the RAM 903 and executed by the computing unit 901, one or more steps of the methods described above can be performed. Alternatively, in other embodiments, the computing unit 901 can be configured to perform the aforementioned method of recognizing license plate images by any other appropriate means, such as by means of firmware.

[0218] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a Field Programmable Gate Array (FPGA), an Application-Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a System on a Chip (SOC), a Complex Programmable Logic Device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0219] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general or special purpose computer, such that the program code, when executed by the processor or controller, causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be implemented in a wholly in machine language, in partially in machine language, in partially in a high level language, and other combinations thereof. The program code can execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.

[0220] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include a linearly-programmed electrical connection, a portable computer diskette, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory), or flash memory, an optical fiber, a CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0221] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0222] The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a LAN (Local Area Network), a WAN (Wide Area Network), the Internet, and a blockchain network.

[0223] The computer system can include clients and servers. This relationship can be between a client and a server that are typically remote from each other and typically interact through a communication network. The relationship between client and server exists by virtue of computer programs running on the respective computer systems and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS (Virtual Private Server, or VPS for short) services. The server can also be a server of a distributed system, or a server combined with a blockchain.

[0224] It should be noted that artificial intelligence is a discipline that studies enabling computers to simulate some thinking processes and intelligent behaviors of humans (such as learning, reasoning, thinking, planning, etc.), both hardware and software technologies. Artificial intelligence hardware technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing, etc.; artificial intelligence software technology mainly includes computer vision technology, speech recognition technology, natural language processing technology, and machine learning / deep learning, big data processing technology, knowledge graph technology, etc. several major directions.

[0225] It should be understood that the various forms of the flow shown above can be used to reorder, add or delete steps. For example, each step described in the present disclosure can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, which is not limited herein.

[0226] The above detailed description does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for recognizing a license plate image, characterized in that: The method comprises: Performing fuzzy judgment on the license plate image from four recognition directions to obtain gradient values ​​of the four recognition directions respectively, wherein the four recognition directions include: a vertical direction, a horizontal direction, a first diagonal direction, and a second diagonal direction; Calculating a fuzzy value of the license plate image according to the gradient values ​​of the four recognition directions; When it is determined that the blur degree indicated by the blur value does not exceed a preset blur degree, the license plate image is corrected according to the coordinates of the four vertex corners of the license plate in the license plate image to obtain a target license plate image; The target license plate image is recognized to obtain a recognition result of the target license plate.

2. The method according to claim 1, characterized in that The fuzzy judgment of the license plate image from four recognition directions is performed to obtain gradient values ​​of the four recognition directions respectively, including: Convolution calculations are performed on the grayscale image corresponding to the license plate image with the convolution kernels of the four recognition directions respectively, to obtain the gradient values ​​of the four recognition directions respectively; The gradient values ​​of the four identification directions include a first gradient value, a second gradient value, a third gradient value, and a fourth gradient value.

3. The method according to claim 2, characterized in that The calculating the fuzzy value of the license plate image according to the gradient values ​​of the four recognition directions includes: Determining the length and width of the license plate image; The length and width of the license plate image, the first gradient value, the second gradient value, the third gradient value, and the fourth gradient value are calculated using a preset fuzzy value formula to obtain a fuzzy value of the license plate image.

4. The method according to claim 1, wherein The correcting process is performed on the license plate image according to the coordinates of the four vertex corners of the license plate in the license plate image to obtain a target license plate image, including: Determining the maximum width and maximum height of the license plate according to the coordinates of the four top corners of the license plate in the license plate image; Taking the coordinates of the upper left corner of the license plate in the license plate image as the origin, performing image correction on the license plate image according to the maximum width and the maximum height to obtain a corrected license plate image; Performing perspective transformation processing on the corrected license plate image to obtain the target license plate image.

5. The method according to any one of claims 1 to 4, characterized in that After correcting the license plate image according to the coordinates of the four vertex corners of the license plate in the license plate image to obtain a target license plate image, the method further includes: Determining whether the target license plate image is a multi-layer license plate; If it is determined that the type of the target license plate image is a multi-layer license plate, segmenting the target license plate image according to the size layout rule of the multi-layer license plate to obtain a first target license plate sub-image and a second target license plate sub-image; Adjusting the size information of the first target license plate sub-image to the same size as the size information of the second target license plate sub-image to obtain an adjusted first target license plate sub-image; The adjusted first target license plate sub-image and the second target license plate sub-image are spliced ​​together to obtain a spliced ​​target license plate image.

6. The method according to claim 5, characterized in that The step of identifying the target license plate image to obtain a recognition result of the target license plate includes: The spliced ​​target license plate image is recognized to obtain a recognition result of the target license plate.

7. The method according to any one of claims 1 to 4 or 6, characterized in that After the target license plate image is recognized and a recognition result of the target license plate is obtained, the method further includes: Performing a credibility judgment on each character in the recognition result of the target license plate to obtain the confidence level of the recognition result of the target license plate; In the case of determining that the confidence exceeds a preset confidence threshold, determining that the recognition result of the target license plate is successful; When it is determined that the confidence level does not exceed the preset confidence threshold, it is determined that the recognition result of the target license plate fails.

8. A license plate image recognition device, characterized in that: The device comprises: a fuzzy judgment unit, configured to perform fuzzy judgment on the license plate image from four recognition directions, and obtain gradient values ​​of the four recognition directions respectively, wherein the four recognition directions include: a vertical direction, a horizontal direction, a first diagonal direction, and a second diagonal direction; a calculation unit, configured to calculate a fuzzy value of the license plate image according to the gradient values ​​of the four recognition directions; a correction unit, which, upon determining that the blur degree indicated by the blur value does not exceed a preset blur degree, performs correction processing on the license plate image according to the coordinates of the four vertex corners of the license plate in the license plate image to obtain a target license plate image; The recognition unit is used to recognize the target license plate image and obtain a recognition result of the target license plate.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.