CN111340041A - License plate recognition method and device based on deep learning - Google Patents

License plate recognition method and device based on deep learning Download PDF

Info

Publication number
CN111340041A
CN111340041A CN202010176205.0A CN202010176205A CN111340041A CN 111340041 A CN111340041 A CN 111340041A CN 202010176205 A CN202010176205 A CN 202010176205A CN 111340041 A CN111340041 A CN 111340041A
Authority
CN
China
Prior art keywords
image
gradient
license plate
probability
normalized
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010176205.0A
Other languages
Chinese (zh)
Other versions
CN111340041B (en
Inventor
刘近平
王俊昌
李晓娜
徐洋
孟稳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anyang Institute of Technology
Original Assignee
Anyang Institute of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anyang Institute of Technology filed Critical Anyang Institute of Technology
Priority to CN202010176205.0A priority Critical patent/CN111340041B/en
Publication of CN111340041A publication Critical patent/CN111340041A/en
Application granted granted Critical
Publication of CN111340041B publication Critical patent/CN111340041B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/32Normalisation of the pattern dimensions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/625License plates

Abstract

The embodiment of the invention discloses a license plate recognition method and a license plate recognition device based on deep learning, which can calculate a gradient probability histogram corresponding to each video image after the video images are obtained by sampling, compare the gradient probability histogram distribution template of each video image with a gradient probability histogram distribution template of a clear license plate image and a gradient probability histogram distribution template of a fuzzy license plate image obtained by pre-calculation, determine the definition confidence coefficient of the video images, and further only recognize the license plate of the video image with higher definition confidence coefficient, so that the accuracy of license plate recognition can be improved. And when the final license plate recognition result is determined according to the plurality of video images, the definition confidence degrees corresponding to the video images can be combined for calculation, so that the accuracy of license plate recognition can be further improved. The number of the character bits included in the license plate recognition result output by the convolutional neural network in the embodiment is consistent with the number of the license plates, so that the condition of more or less recognition characters can be avoided, and the accuracy of license plate recognition is improved.

Description

License plate recognition method and device based on deep learning
Technical Field
The invention relates to the technical field of image processing, in particular to a license plate recognition method and device based on deep learning.
Background
In the field of video monitoring, license plate recognition is generally required in a monitoring video to track a vehicle and the like. In known methods, voting may be based on the identification scheme of the surveillance video. Specifically, video images are obtained by sampling in a monitoring video, license plate recognition is carried out on all the video images, and finally all recognition results are adopted for voting processing to obtain license plate recognition results.
However, in the above method, since there may be a motion-blurred and defocus-blurred video image, this will result in a low accuracy of license plate recognition. Therefore, in order to improve the accuracy of license plate recognition, a license plate recognition method is urgently needed.
Disclosure of Invention
The invention provides a license plate recognition method and device based on deep learning, and aims to improve the accuracy of license plate recognition. The specific technical scheme is as follows.
In a first aspect, an embodiment of the present invention provides a license plate recognition method based on deep learning, where the method includes:
sampling is carried out on the basis of a preset sampling period in a monitoring video containing a target license plate, so that a plurality of video images containing the target license plate are obtained;
carrying out gray level conversion on the multiple video images to obtain multiple gray level video images; normalizing the multiple gray level video images to a preset size to obtain multiple target video images;
performing convolution operation on each target video image through a preset x-direction filter to obtain an x-edge image corresponding to each target video image; performing convolution operation on each target video image through a preset y-direction filter to obtain a y-edge image corresponding to each target video image; calculating a gradient image corresponding to each target video image according to each x edge image and each corresponding y edge image;
normalizing the pixel values of the gradient images to obtain normalized gradient images, performing histogram statistics on the normalized gradient images aiming at each normalized gradient image to obtain the statistical number of the pixel values in the normalized gradient images, calculating the probability value of the statistical number in the total pixel number of the normalized gradient images, and constructing a gradient probability histogram corresponding to the normalized gradient images and containing the probability value;
acquiring a gradient probability histogram distribution template of a clear license plate image and a gradient probability histogram distribution template of a fuzzy license plate image which are obtained through pre-calculation, calculating a first cosine distance between a gradient probability histogram corresponding to the normalized gradient image and the gradient probability histogram distribution template of the clear license plate image and a second cosine distance between the gradient probability histogram corresponding to the normalized gradient image and the gradient probability histogram distribution template of the fuzzy license plate image aiming at each normalized gradient image, and determining a definition confidence coefficient corresponding to the normalized gradient image according to the sizes of the first cosine distance and the second cosine distance; the clear license plate image gradient probability histogram distribution template is obtained by calculation according to a pre-acquired clear image, and the fuzzy license plate image gradient probability histogram distribution template is obtained by calculation according to a pre-acquired fuzzy image;
inputting the video images corresponding to the normalized gradient images with the definition confidence degrees larger than a preset confidence degree threshold value into a convolutional neural network obtained by pre-training to obtain license plate recognition results corresponding to the video images; obtaining a final recognition result of the target license plate according to the license plate recognition result corresponding to each video image and the definition confidence coefficient of the normalized gradient image corresponding to each video image; the license plate recognition result comprises a plurality of characters at preset positions.
Optionally, the step of calculating a gradient image corresponding to each target video image according to each x-edge image and each corresponding y-edge image includes:
calculating the pixel value of any point in the gradient image corresponding to any target video image according to the following formulaG(x,y)
Figure DEST_PATH_IMAGE001
GxThe pixel value of any point in the x-edge image corresponding to any target video image,Gythe pixel value of the point in the y edge image corresponding to any target video image is obtained;
the step of normalizing the pixel values of each gradient image to obtain each normalized gradient image comprises:
updating the pixel values of each of the gradient images according to the following formula:
Figure 348721DEST_PATH_IMAGE002
optionally, the step of calculating the probability value of the statistical quantities in the total pixel quantity of the normalized gradient image includes:
calculating any statistical quantity according to the following formulabiProbability value of total pixel number of the normalized gradient imagepi
Figure DEST_PATH_IMAGE003
bj is the number of pixel points with the pixel value j in the normalized gradient image.
Optionally, the step of calculating a first cosine distance between the gradient probability histogram corresponding to the normalized gradient image and the gradient probability histogram distribution template of the clear license plate image includes:
calculating a first cosine distance between a gradient probability histogram corresponding to the normalized gradient image and a gradient probability histogram distribution template of the clear license plate image according to the following formula:
Figure 845955DEST_PATH_IMAGE004
xiis the probability value corresponding to the pixel value i in the gradient probability histogram corresponding to the normalized gradient image,yiand obtaining a probability value corresponding to the pixel value i in the gradient probability histogram distribution template of the clear license plate image.
Optionally, the step of determining the sharpness confidence corresponding to the normalized gradient image according to the first cosine distance and the second cosine distance includes:
when the first cosine distance is greater than the second cosine distance, determining the definition confidence coefficient corresponding to the normalized gradient image as the first cosine distance;
and when the first cosine distance is not greater than the second cosine distance, determining that the definition confidence coefficient corresponding to the normalized gradient image is 0.
Optionally, the step of obtaining a final recognition result of the target license plate according to the license plate recognition result corresponding to each of the video images and the sharpness confidence of the normalized gradient image corresponding to each of the video images includes:
according to the arrangement sequence of the license plate recognition results, aiming at the h character in the target license plate, when the preferred recognition results of the h character in partial images in the video image are all k, and the preferred posterior probability of each partial imageS k And when the sum of the product of the definition confidence coefficients of the corresponding normalized gradient images is maximum, determining that the final recognition result of the h-th character of the target license plate is k.
Optionally, the construction process of the gradient probability histogram distribution template of the clear license plate image and the gradient probability histogram distribution template of the fuzzy license plate image includes:
acquiring a sample video image, determining the sample video image with the definition greater than a preset threshold value as a clear image, and determining the sample video image with the definition not greater than the preset threshold value as a blurred image;
calculating a gradient probability histogram corresponding to each clear image and a gradient probability histogram corresponding to each fuzzy image;
calculating a first average value of the probability values corresponding to the same pixel values in the gradient probability histogram corresponding to each clear image, and constructing and obtaining a clear license plate image gradient probability histogram distribution template containing each first average value; and calculating a second average value of the probability values corresponding to the same pixel values in the gradient probability histograms corresponding to the fuzzy images, and constructing a fuzzy license plate image gradient probability histogram distribution template containing the second average values.
Optionally, the convolutional neural network is trained by using a gradient back propagation algorithm, and a loss function of the convolutional neural network is as follows:
Figure DEST_PATH_IMAGE005
wherein T is the total number of character categories, M is the number of character digits contained in a license plate, and y is the number of characters contained in the license plate when the obtained classification result is correctjIs 1, otherwise is 0;S j preferred posterior probabilities output for the convolutional neural network:
Figure 484746DEST_PATH_IMAGE006
a k estimating a resulting distance identified as a character k for the convolutional neural network,a j estimating a resulting distance identified as a character j for the convolutional neural network.
In a second aspect, an embodiment of the present invention provides a license plate recognition device based on deep learning, where the license plate recognition device includes:
the video sampling module is used for sampling a monitoring video containing a target license plate based on a preset sampling period to obtain a plurality of video images containing the target license plate;
the gray level conversion module is used for carrying out gray level conversion on the plurality of video images to obtain a plurality of gray level video images; normalizing the multiple gray level video images to a preset size to obtain multiple target video images;
the filtering operation module is used for performing convolution operation on each target video image through a preset x-direction filter to obtain an x-edge image corresponding to each target video image; performing convolution operation on each target video image through a preset y-direction filter to obtain a y-edge image corresponding to each target video image; calculating a gradient image corresponding to each target video image according to each x edge image and each corresponding y edge image;
a histogram statistic module, configured to normalize the pixel values of each gradient image to obtain each normalized gradient image, perform histogram statistics on the normalized gradient image for each normalized gradient image to obtain a statistical number of each pixel value in the normalized gradient image, calculate a probability value of each statistical number in the total pixel number of the normalized gradient image, and construct a gradient probability histogram corresponding to the normalized gradient image and including each probability value;
the definition calculation module is used for acquiring a gradient probability histogram distribution template of a clear license plate image and a gradient probability histogram distribution template of a fuzzy license plate image which are obtained through pre-calculation, calculating a first cosine distance between a gradient probability histogram corresponding to the normalized gradient image and the gradient probability histogram distribution template of the clear license plate image and a second cosine distance between the gradient probability histogram corresponding to the normalized gradient image and the gradient probability histogram distribution template of the fuzzy license plate image, and determining a definition confidence coefficient corresponding to the normalized gradient image according to the first cosine distance and the second cosine distance; the clear license plate image gradient probability histogram distribution template is obtained by calculation according to a pre-acquired clear image, and the fuzzy license plate image gradient probability histogram distribution template is obtained by calculation according to a pre-acquired fuzzy image;
the license plate recognition module is used for inputting the video image corresponding to the normalized gradient image with the definition confidence coefficient greater than a preset confidence coefficient threshold value into a convolutional neural network obtained by pre-training to obtain a license plate recognition result corresponding to each video image; obtaining a final recognition result of the target license plate according to the license plate recognition result corresponding to each video image and the definition confidence coefficient of the normalized gradient image corresponding to each video image; the license plate recognition result comprises a plurality of characters at preset positions.
Optionally, the filtering operation module is specifically configured to calculate a pixel value of any point in a gradient image corresponding to any target video image according to the following formulaG(x,y)
Figure DEST_PATH_IMAGE007
GxThe pixel value of any point in the x-edge image corresponding to any target video image,Gythe pixel value of the point in the y edge image corresponding to any target video image is obtained;
the histogram statistic module is specifically configured to update the pixel value of each gradient image according to the following formula:
Figure 427426DEST_PATH_IMAGE008
optionally, the histogram statistic module is specifically configured to calculate any statistical quantity according to the following formulabiProbability value of total pixel number of the normalized gradient imagepi
Figure DEST_PATH_IMAGE009
bj is the number of pixel points with the pixel value j in the normalized gradient image.
Optionally, the definition calculating module is specifically configured to calculate a first cosine distance between a gradient probability histogram corresponding to the normalized gradient image and the distribution template of the gradient probability histogram of the clear license plate image according to the following formula:
Figure 350120DEST_PATH_IMAGE010
xiis the probability value corresponding to the pixel value i in the gradient probability histogram corresponding to the normalized gradient image,yiand obtaining a probability value corresponding to the pixel value i in the gradient probability histogram distribution template of the clear license plate image.
Optionally, the sharpness calculation module is specifically configured to determine, when the first cosine distance is greater than the second cosine distance, a sharpness confidence corresponding to the normalized gradient image as the first cosine distance; and when the first cosine distance is not greater than the second cosine distance, determining that the definition confidence coefficient corresponding to the normalized gradient image is 0.
Optionally, the license plate recognition module is specifically configured to, for the h character in the target license plate according to the arrangement sequence of the license plate recognition results, when the preferred recognition results of the h character in the partial images in the video image are all k, and the preferred posterior probability of each partial image isS k And when the sum of the product of the definition confidence coefficients of the corresponding normalized gradient images is maximum, determining that the final recognition result of the h-th character of the target license plate is k.
Optionally, the apparatus further comprises:
the image acquisition module is used for acquiring a sample video image, determining the sample video image with the definition greater than a preset threshold value as a clear image, and determining the sample video image with the definition not greater than the preset threshold value as a blurred image;
the histogram calculation module is used for calculating a gradient probability histogram corresponding to each clear image and a gradient probability histogram corresponding to each fuzzy image;
the histogram distribution module construction module is used for calculating a first average value of the probability values corresponding to the same pixel value in the gradient probability histogram corresponding to each clear image, and constructing a clear license plate image gradient probability histogram distribution template containing the first average values; and calculating a second average value of the probability values corresponding to the same pixel values in the gradient probability histograms corresponding to the fuzzy images, and constructing a fuzzy license plate image gradient probability histogram distribution template containing the second average values.
Optionally, the convolutional neural network is trained by using a gradient back propagation algorithm, and a loss function of the convolutional neural network is as follows:
Figure DEST_PATH_IMAGE011
wherein T is the total number of character categories, M is the number of character digits contained in a license plate, and y is the number of characters contained in the license plate when the obtained classification result is correctjIs 1, otherwise is 0. This running sum is an expression of mathematics for T, because for each position character, only one y in the running sum is 1, and the rest are all 0; the above-described penalty function is a running sum of loss over M characters.S j Preferred posterior probabilities for convolutional neural network output:
Figure 234899DEST_PATH_IMAGE012
a k estimating a resulting distance identified as a character k for the convolutional neural network,a j estimating a resulting distance identified as a character j for the convolutional neural network.
As can be seen from the above, the license plate recognition method and device based on deep learning provided by the embodiment of the invention can perform sampling based on a preset sampling period in a surveillance video including a target license plate to obtain a plurality of video images including the target license plate; carrying out gray level conversion on the multiple video images to obtain multiple gray level video images; normalizing the multiple gray level video images to a preset size to obtain multiple target video images; performing convolution operation on each target video image through a preset x-direction filter to obtain an x-edge image corresponding to each target video image; performing convolution operation on each target video image through a preset y-direction filter to obtain a y-edge image corresponding to each target video image; calculating a gradient image corresponding to each target video image according to each x edge image and each corresponding y edge image; normalizing the pixel values of the gradient images to obtain normalized gradient images, performing histogram statistics on the normalized gradient images aiming at each normalized gradient image to obtain the statistical number of the pixel values in the normalized gradient images, calculating the probability value of the statistical number in the total pixel number of the normalized gradient images, and constructing a gradient probability histogram corresponding to the normalized gradient images containing the probability values; acquiring a gradient probability histogram distribution template of a clear license plate image and a gradient probability histogram distribution template of a fuzzy license plate image which are obtained through pre-calculation, calculating a first cosine distance between a gradient probability histogram corresponding to a normalized gradient image and the gradient probability histogram distribution template of the clear license plate image and a second cosine distance between the gradient probability histogram corresponding to the normalized gradient image and the gradient probability histogram distribution template of the fuzzy license plate image aiming at each normalized gradient image, and determining a definition confidence coefficient corresponding to the normalized gradient image according to the sizes of the first cosine distance and the second cosine distance; the clear license plate image gradient probability histogram distribution template is obtained by calculation according to a pre-acquired clear image, and the fuzzy license plate image gradient probability histogram distribution template is obtained by calculation according to a pre-acquired fuzzy image; inputting the video image corresponding to the normalized gradient image with the definition confidence coefficient greater than the preset confidence coefficient threshold value into a convolutional neural network obtained by pre-training to obtain a license plate recognition result corresponding to each video image; obtaining a final recognition result of the target license plate according to the license plate recognition result corresponding to each video image and the definition confidence coefficient of the normalized gradient image corresponding to each video image; the license plate recognition result comprises a plurality of preset characters, so that after video images are obtained through sampling, a gradient probability histogram corresponding to each video image is calculated and compared with a gradient probability histogram distribution template of a clear license plate image and a gradient probability histogram distribution template of a fuzzy license plate image which are obtained through pre-calculation, the definition confidence coefficient of the video images is determined, and then license plate recognition can be carried out on only the video images with high definition confidence coefficient, namely, the fuzzy images can be removed from all the video images, and license plate recognition is carried out only by utilizing the clear images, so that the accuracy of license plate recognition can be improved. And when the final license plate recognition result is determined according to the plurality of video images, the definition confidence degrees corresponding to the video images can be combined for calculation, so that the accuracy of license plate recognition can be further improved. The number of the character bits included in the license plate recognition result output by the convolutional neural network in the embodiment is consistent with the number of the license plates, so that the condition of more or less recognition characters can be avoided, and the accuracy of license plate recognition is improved. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
The innovation points of the embodiment of the invention comprise:
after video images are obtained through sampling, a gradient probability histogram corresponding to each video image is calculated, and compared with a clear license plate image gradient probability histogram distribution template and a fuzzy license plate image gradient probability histogram distribution template which are obtained through pre-calculation, the definition confidence coefficient of the video images is determined, and then license plate recognition can be carried out on only the video images with the higher definition confidence coefficient, namely, the fuzzy images can be removed from all the video images, and license plate recognition is carried out only by utilizing the clear images, so that the accuracy of license plate recognition can be improved. And when the final license plate recognition result is determined according to the plurality of video images, the definition confidence degrees corresponding to the video images can be combined for calculation, so that the accuracy of license plate recognition can be further improved. The number of the character bits included in the license plate recognition result output by the convolutional neural network in the embodiment is consistent with the number of the license plates, so that the condition of more or less recognition characters can be avoided, and the accuracy of license plate recognition is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It is to be understood that the drawings in the following description are merely exemplary of some embodiments of the invention. For a person skilled in the art, without inventive effort, further figures can be obtained from these figures.
Fig. 1 is a schematic flow chart of a license plate recognition method based on deep learning according to an embodiment of the present invention.
FIG. 2 is a diagram of an x-direction filter and a y-direction filter according to an embodiment of the present invention.
Fig. 3 is another schematic flow chart of a license plate recognition method based on deep learning according to an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a license plate recognition device based on deep learning according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely a few embodiments of the invention, and not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
It is to be noted that the terms "comprises" and "comprising" and any variations thereof in the embodiments and drawings of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
The embodiment of the invention discloses a license plate recognition method and device based on deep learning, which can improve the accuracy of license plate recognition. The following provides a detailed description of embodiments of the invention.
Fig. 1 is a schematic flow chart of a license plate recognition method based on deep learning according to an embodiment of the present invention. The method is applied to the electronic equipment. The method specifically comprises the following steps.
S110: sampling is carried out on the basis of a preset sampling period in a monitoring video containing a target license plate, and a plurality of video images containing the target license plate are obtained.
In the embodiment of the invention, the foreground detection and tracking functions of the license plate recognition system can be called to recognize the monitoring video containing the same vehicle, and the license plate of the same vehicle can be called as a target license plate. The monitoring video can be a monitoring video collected in scenes such as a community entrance, a high-speed gate and the like.
The preset sampling period may be, for example, 100 milliseconds, 500 milliseconds, 1 second, or may be set according to different scenarios, which is not limited in the embodiment of the present invention.
S120: carrying out gray level conversion on the multiple video images to obtain multiple gray level video images; and normalizing the plurality of gray level video images to a preset size to obtain a plurality of target video images.
In the embodiment of the present invention, the video image obtained by the sampling is a color image. In order to calculate the gradient probability histogram of each video image, the video image may be subjected to gray scale conversion, that is, the video image is converted into an image with image pixel values of 0 to 255, which is referred to as a gray scale video image.
After obtaining each gray scale video image, the size of each gray scale video image may be normalized, for example, each gray scale video image may be normalized to 32 × 240 pixels, and the normalized image may be referred to as a target video image. Therefore, gradient differences caused by different sizes of the gray-scale video images can be avoided, the influence on the license plate recognition result when the license plate recognition result is calculated according to the gradient probability histogram is further reduced, and the accuracy of the license plate recognition is improved.
S130: performing convolution operation on each target video image through a preset x-direction filter to obtain an x-edge image corresponding to each target video image; performing convolution operation on each target video image through a preset y-direction filter to obtain a y-edge image corresponding to each target video image; and calculating the gradient image corresponding to each target video image according to each x edge image and each corresponding y edge image.
In the embodiment of the invention, a sobel algorithm can be used for calculating the gradient probability histogram of each target video image. Specifically, the x-edge image and the y-edge image of each target video image may be calculated first. For example, assuming that the input target video image is I, the x-edge image Gx and the y-edge image Gy corresponding thereto are:
Gx = Sx*I,Gy = Sy*I
wherein, is a convolution operation; sx is an x-direction filter, and Sy is a y-direction filter. In one example, Sx and Sy are shown in FIG. 2.
In one implementation, when the gradient image corresponding to each target video image is calculated according to each x-edge image and each corresponding y-edge image, the pixel value of any point in the gradient image corresponding to any target video image can be calculated according to the following formulaG(x,y)
Figure DEST_PATH_IMAGE013
GxFor any pixel value of any point in the x-edge image corresponding to any target video image,Gythe pixel value of the point in the y-edge image corresponding to the target video image.
S140: normalizing the pixel values of the gradient images to obtain normalized gradient images, carrying out histogram statistics on the normalized gradient images aiming at each normalized gradient image to obtain the statistical number of the pixel values in the normalized gradient images, calculating the probability value of the statistical number in the total pixel number of the normalized gradient images, and constructing a gradient probability histogram corresponding to the normalized gradient images containing the probability values.
In an implementation manner, when the pixel values of each gradient image are normalized to obtain each normalized gradient image, the pixel values of each gradient image may be updated according to the following formula:
Figure 314982DEST_PATH_IMAGE014
the pixel values of the gradient images are normalized, so that the problem of inaccurate matching caused by overlarge gradient variance can be solved, the calculation complexity of subsequent histogram statistics can be reduced, and the algorithm efficiency is improved.
After obtaining each normalized gradient image, histogram statistics can be further performed on each normalized gradient image to obtain the statistical number of each pixel value in each normalized gradient image. That is, for each normalized gradient image, 256 statistical numbers may be obtained, which may be represented as the number of pixel values 0, b1, the number of pixel values 1, b2, and so on, the number of pixel values 255, b 255.
In an implementation manner, when the probability value of each statistical quantity in the total pixel number of the normalized gradient image is calculated for each normalized gradient image, any statistical quantity can be calculated according to the following formulabiProbability value of total pixel number of the normalized gradient imagepi
Figure DEST_PATH_IMAGE015
bj is the number of pixel points with the pixel value j in the normalized gradient image.
S150: acquiring a gradient probability histogram distribution template of a clear license plate image and a gradient probability histogram distribution template of a fuzzy license plate image which are obtained through pre-calculation, calculating a first cosine distance between a gradient probability histogram corresponding to a normalized gradient image and the gradient probability histogram distribution template of the clear license plate image and a second cosine distance between the gradient probability histogram corresponding to the normalized gradient image and the gradient probability histogram distribution template of the fuzzy license plate image aiming at each normalized gradient image, and determining a definition confidence coefficient corresponding to the normalized gradient image according to the sizes of the first cosine distance and the second cosine distance; the clear license plate image gradient probability histogram distribution template is obtained by calculation according to a pre-acquired clear image, and the fuzzy license plate image gradient probability histogram distribution template is obtained by calculation according to a pre-acquired fuzzy image.
In the embodiment of the invention, the license plate image can be collected in advance, and the manual work is divided into a clear type and a fuzzy type. And calculating a gradient probability histogram according to the mode, and averaging the obtained probability histogram to obtain a clear license plate image gradient probability histogram distribution template binC and a fuzzy license plate image gradient probability histogram distribution template binB.
Specifically, as shown in fig. 3, the construction process of the gradient probability histogram distribution template of the clear license plate image and the gradient probability histogram distribution template of the blurred license plate image may include the following steps.
S310: and acquiring a sample video image, determining the sample video image with the definition greater than a preset threshold as a clear image, and determining the sample video image with the definition not greater than the preset threshold as a blurred image.
The sample video image can be an image which is collected by monitoring equipment and contains a license plate. When the electronic device performs image classification, the preset threshold value can be determined according to an empirical value, and the specific value of the preset threshold value is not limited in the embodiment of the invention. Alternatively, the image classification may be performed manually, and this is all possible, and the image classification method is not limited in the embodiment of the present invention.
S320: and calculating a gradient probability histogram corresponding to each clear image and a gradient probability histogram corresponding to each fuzzy image.
Specifically, the gradient probability histogram corresponding to each sharp image and the gradient probability histogram corresponding to each blurred image may be calculated according to steps similar to steps S120 to S140, which are not described herein again.
S330: calculating a first average value of the probability values corresponding to the same pixel values in the gradient probability histograms corresponding to the clear images, and constructing a clear license plate image gradient probability histogram distribution template containing the first average values; and calculating a second average value of the probability values corresponding to the same pixel values in the gradient probability histogram corresponding to each fuzzy image, and constructing to obtain a fuzzy license plate image gradient probability histogram distribution template containing each second average value.
The clear license plate image gradient probability histogram distribution template and the fuzzy license plate image gradient probability histogram distribution template are obtained through calculation, and when license plate recognition is carried out, the image to be recognized can be subjected to definition division, so that license plate recognition is carried out only according to the clear image, and the accuracy of license plate recognition is improved.
In one implementation, when calculating, for each normalized gradient image, a first cosine distance between a gradient probability histogram corresponding to the normalized gradient image and a gradient probability histogram distribution template of a clear license plate image, the first cosine distance between the gradient probability histogram corresponding to the normalized gradient image and the gradient probability histogram distribution template of the clear license plate image may be specifically calculated according to the following formula:
Figure 310620DEST_PATH_IMAGE016
xiis the probability value corresponding to the pixel value i in the gradient probability histogram corresponding to the normalized gradient image,yithe probability value corresponding to the pixel value i in the gradient probability histogram distribution template of the clear license plate image is obtained.
Similarly, when the second cosine distance between the gradient probability histogram corresponding to the normalized gradient image and the distribution template of the gradient probability histogram of the blurred license plate image is calculated, the calculation can also be performed according to the formula, and at this time, the calculation is performed according to the formulayiNamely the probability value corresponding to the pixel value i in the gradient probability histogram distribution template of the fuzzy license plate image.
When the definition confidence corresponding to the normalized gradient image is determined according to the sizes of the first cosine distance and the second cosine distance, when the first cosine distance is greater than the second cosine distance, the definition confidence corresponding to the normalized gradient image is determined to be the first cosine distance; and when the first cosine distance is not greater than the second cosine distance, determining that the definition confidence coefficient corresponding to the normalized gradient image is 0.
The confidence describes the confidence of the definition of the current video image, and can be used for classifying the clear and fuzzy images and weighting and fusing the subsequent identification results.
S160: inputting the video image corresponding to the normalized gradient image with the definition confidence coefficient greater than the preset confidence coefficient threshold value into a convolutional neural network obtained by pre-training to obtain a license plate recognition result corresponding to each video image; obtaining a final recognition result of the target license plate according to the license plate recognition result corresponding to each video image and the definition confidence coefficient of the normalized gradient image corresponding to each video image; the license plate recognition result comprises a plurality of characters at preset positions.
In the embodiment of the invention, the convolutional neural network for recognizing the license plate can be obtained by pre-training. For example, a convolutional neural network with googleNet as a backbone network can be constructed, a license plate image labeled with a license plate result is used as a training sample, and a gradient back propagation algorithm is adopted for training to obtain the convolutional neural network.
The loss function of the convolutional neural network may be:
Figure DEST_PATH_IMAGE017
wherein T is the total number of character categories, M is the number of character digits contained in a license plate, and y is the number of characters contained in the license plate when the obtained classification result is correctjIs 1, otherwise is 0;S j preferred posterior probabilities for convolutional neural network output:
Figure 294013DEST_PATH_IMAGE018
a k the resulting distance identified as the character k is estimated for the convolutional neural network,a j the resulting distance identified as character j is estimated for the convolutional neural network.
When the license plate is identified, the video image corresponding to the normalized gradient image with the definition confidence coefficient greater than the preset confidence coefficient threshold value can be input into the trained convolutional neural network, and the license plate identification result corresponding to each video image is obtained. The convolutional neural network is an isometric character string recognition, and the output result contains a plurality of characters with preset bits, such as 7.
When the final recognition result of the target license plate is obtained according to the license plate recognition result corresponding to each video image and the definition confidence coefficient of the normalized gradient image corresponding to each video image, specifically, the h character in the target license plate can be pointed to according to the arrangement sequence of the license plate recognition results, when the preferred recognition results of the h character in partial images in the video images are all k, and the preferred posterior probability of each part of image isS k And when the sum of the products of the h characters and the definition confidence degrees of the corresponding normalized gradient images is maximum, determining that the final recognition result of the h character of the target license plate is k. Wherein the preferred posterior probability of each video image is output by the convolutional neural network.
That is to say, after image quality classification, the definition confidence corresponding to the license plate image of M video images entering the recognition process is conf 1-confM, the corresponding recognition result sequence is resi = { c1, c2, …, cT }, 0< = i < = M, and assuming that the number of character types is N, the recognition result of weighted fusion of the jth character in the license plate image is:
cj = k, max (scorek), 0< = k < = N, scorek being the sum of the products of the first choice posterior probability and the sharpness confidence for all sharp images identifying the first choice as character class k.
As can be seen from the above, the license plate recognition method based on deep learning provided in the embodiments of the present invention can calculate the gradient probability histogram corresponding to each video image after the video images are obtained by sampling, compare the gradient probability histogram distribution template of the clear license plate image and the gradient probability histogram distribution template of the blurred license plate image obtained by pre-calculation, determine the sharpness confidence of the video images, and further perform license plate recognition on only the video images with a high sharpness confidence, that is, remove blurred images from all the video images, and perform license plate recognition only using the sharp images, thereby improving the accuracy of license plate recognition. And when the final license plate recognition result is determined according to the plurality of video images, the definition confidence degrees corresponding to the video images can be combined for calculation, so that the accuracy of license plate recognition can be further improved. The number of the character bits included in the license plate recognition result output by the convolutional neural network in the embodiment is consistent with the number of the license plates, so that the condition of more or less recognition characters can be avoided, and the accuracy of license plate recognition is improved.
As shown in fig. 4, a license plate recognition device based on deep learning according to an embodiment of the present invention may include:
the video sampling module 410 is used for sampling a monitoring video containing a target license plate based on a preset sampling period to obtain a plurality of video images containing the target license plate;
a gray level conversion module 420, configured to perform gray level conversion on the multiple video images to obtain multiple gray level video images; normalizing the multiple gray level video images to a preset size to obtain multiple target video images;
a filtering operation module 430, configured to perform convolution operation on each target video image through a preset x-direction filter, respectively, to obtain an x-edge image corresponding to each target video image; performing convolution operation on each target video image through a preset y-direction filter to obtain a y-edge image corresponding to each target video image; calculating a gradient image corresponding to each target video image according to each x edge image and each corresponding y edge image;
a histogram statistic module 440, configured to normalize the pixel values of each gradient image to obtain each normalized gradient image, perform histogram statistics on the normalized gradient image for each normalized gradient image to obtain a statistical number of each pixel value in the normalized gradient image, calculate a probability value of each statistical number in the total pixel number of the normalized gradient image, and construct a gradient probability histogram corresponding to the normalized gradient image and including each probability value;
a definition calculating module 450, configured to obtain a gradient probability histogram distribution template of a clear license plate image and a gradient probability histogram distribution template of a fuzzy license plate image, which are obtained through pre-calculation, calculate, for each normalized gradient image, a first cosine distance between a gradient probability histogram corresponding to the normalized gradient image and the gradient probability histogram distribution template of the clear license plate image, and a second cosine distance between the gradient probability histogram corresponding to the normalized gradient image and the gradient probability histogram distribution template of the fuzzy license plate image, and determine a definition confidence corresponding to the normalized gradient image according to the magnitudes of the first cosine distance and the second cosine distance; the clear license plate image gradient probability histogram distribution template is obtained by calculation according to a pre-acquired clear image, and the fuzzy license plate image gradient probability histogram distribution template is obtained by calculation according to a pre-acquired fuzzy image;
the license plate recognition module 460 is configured to input a video image corresponding to the normalized gradient image with the definition confidence greater than a preset confidence threshold into a convolutional neural network obtained through pre-training, so as to obtain a license plate recognition result corresponding to each video image; obtaining a final recognition result of the target license plate according to the license plate recognition result corresponding to each video image and the definition confidence coefficient of the normalized gradient image corresponding to each video image; the license plate recognition result comprises a plurality of characters at preset positions.
Optionally, the filtering operation module 430 is specifically configured to calculate a pixel value of any point in a gradient image corresponding to any target video image according to the following formulaG(x,y)
Figure DEST_PATH_IMAGE019
GxThe pixel value of any point in the x-edge image corresponding to any target video image,Gythe pixel value of the point in the y edge image corresponding to any target video image is obtained;
the histogram statistic module 440 is specifically configured to update the pixel value of each gradient image according to the following formula:
Figure 349693DEST_PATH_IMAGE020
optionally, the histogram statistics module 440 hasThe volume is used to calculate any statistical quantity according to the following formulabiProbability value of total pixel number of the normalized gradient imagepi
Figure DEST_PATH_IMAGE021
bj is the number of pixel points with the pixel value j in the normalized gradient image.
Optionally, the sharpness calculating module 450 is specifically configured to calculate a first cosine distance between a gradient probability histogram corresponding to the normalized gradient image and the distribution template of the gradient probability histogram of the sharp license plate image according to the following formula:
Figure 917072DEST_PATH_IMAGE022
xiis the probability value corresponding to the pixel value i in the gradient probability histogram corresponding to the normalized gradient image,yiand obtaining a probability value corresponding to the pixel value i in the gradient probability histogram distribution template of the clear license plate image.
Optionally, the sharpness calculating module 450 is specifically configured to determine, when the first cosine distance is greater than the second cosine distance, that the sharpness confidence corresponding to the normalized gradient image is the first cosine distance; and when the first cosine distance is not greater than the second cosine distance, determining that the definition confidence coefficient corresponding to the normalized gradient image is 0.
Optionally, the license plate recognition module 460 is specifically configured to, according to the arrangement order of the license plate recognition results, for the h character in the target license plate, when the preferred recognition results of the h character in the partial images in the video image are all k, and the preferred posterior probability of each partial image is kS k And when the sum of the product of the definition confidence coefficients of the corresponding normalized gradient images is maximum, determining that the final recognition result of the h-th character of the target license plate is k.
Optionally, the apparatus further comprises:
the image acquisition module is used for acquiring a sample video image, determining the sample video image with the definition greater than a preset threshold value as a clear image, and determining the sample video image with the definition not greater than the preset threshold value as a blurred image;
the histogram calculation module is used for calculating a gradient probability histogram corresponding to each clear image and a gradient probability histogram corresponding to each fuzzy image;
the histogram distribution module construction module is used for calculating a first average value of the probability values corresponding to the same pixel value in the gradient probability histogram corresponding to each clear image, and constructing a clear license plate image gradient probability histogram distribution template containing the first average values; and calculating a second average value of the probability values corresponding to the same pixel values in the gradient probability histograms corresponding to the fuzzy images, and constructing a fuzzy license plate image gradient probability histogram distribution template containing the second average values.
Optionally, the convolutional neural network is trained by using a gradient back propagation algorithm, and a loss function of the convolutional neural network is as follows:
Figure DEST_PATH_IMAGE023
wherein T is the total number of character categories, M is the number of character digits contained in a license plate, and y is the number of characters contained in the license plate when the obtained classification result is correctjIs 1, otherwise is 0;S j preferred posterior probabilities output for the convolutional neural network:
Figure 716401DEST_PATH_IMAGE024
a k estimating a resulting distance identified as a character k for the convolutional neural network,a j estimating a resulting distance identified as a character j for the convolutional neural network.
As can be seen from the above, the license plate recognition device based on deep learning provided in the embodiments of the present invention can calculate the gradient probability histogram corresponding to each video image after obtaining the video images through sampling, compare the gradient probability histogram distribution template of the clear license plate image and the gradient probability histogram distribution template of the blurred license plate image obtained through pre-calculation, determine the definition confidence of the video images, and further perform license plate recognition on only the video images with a high definition confidence, that is, remove the blurred images from all the video images, and perform license plate recognition only using the clear images, thereby improving the accuracy of license plate recognition. And when the final license plate recognition result is determined according to the plurality of video images, the definition confidence degrees corresponding to the video images can be combined for calculation, so that the accuracy of license plate recognition can be further improved. The number of the character bits included in the license plate recognition result output by the convolutional neural network in the embodiment is consistent with the number of the license plates, so that the condition of more or less recognition characters can be avoided, and the accuracy of license plate recognition is improved.
The above device embodiment corresponds to the method embodiment, and has the same technical effect as the method embodiment, and for the specific description, refer to the method embodiment. The device embodiment is obtained based on the method embodiment, and for specific description, reference may be made to the method embodiment section, which is not described herein again.
Those of ordinary skill in the art will understand that: the figures are merely schematic representations of one embodiment, and the blocks or flow diagrams in the figures are not necessarily required to practice the present invention.
Those of ordinary skill in the art will understand that: modules in the devices in the embodiments may be distributed in the devices in the embodiments according to the description of the embodiments, or may be located in one or more devices different from the embodiments with corresponding changes. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A license plate recognition method based on deep learning is characterized by comprising the following steps:
sampling is carried out on the basis of a preset sampling period in a monitoring video containing a target license plate, so that a plurality of video images containing the target license plate are obtained;
carrying out gray level conversion on the multiple video images to obtain multiple gray level video images; normalizing the multiple gray level video images to a preset size to obtain multiple target video images;
performing convolution operation on each target video image through a preset x-direction filter to obtain an x-edge image corresponding to each target video image; performing convolution operation on each target video image through a preset y-direction filter to obtain a y-edge image corresponding to each target video image; calculating a gradient image corresponding to each target video image according to each x edge image and each corresponding y edge image;
normalizing the pixel values of the gradient images to obtain normalized gradient images, performing histogram statistics on the normalized gradient images aiming at each normalized gradient image to obtain the statistical number of the pixel values in the normalized gradient images, calculating the probability value of the statistical number in the total pixel number of the normalized gradient images, and constructing a gradient probability histogram corresponding to the normalized gradient images and containing the probability value;
acquiring a gradient probability histogram distribution template of a clear license plate image and a gradient probability histogram distribution template of a fuzzy license plate image which are obtained through pre-calculation, calculating a first cosine distance between a gradient probability histogram corresponding to the normalized gradient image and the gradient probability histogram distribution template of the clear license plate image and a second cosine distance between the gradient probability histogram corresponding to the normalized gradient image and the gradient probability histogram distribution template of the fuzzy license plate image aiming at each normalized gradient image, and determining a definition confidence coefficient corresponding to the normalized gradient image according to the sizes of the first cosine distance and the second cosine distance; the clear license plate image gradient probability histogram distribution template is obtained by calculation according to a pre-acquired clear image, and the fuzzy license plate image gradient probability histogram distribution template is obtained by calculation according to a pre-acquired fuzzy image;
inputting the video images corresponding to the normalized gradient images with the definition confidence degrees larger than a preset confidence degree threshold value into a convolutional neural network obtained by pre-training to obtain license plate recognition results corresponding to the video images; obtaining a final recognition result of the target license plate according to the license plate recognition result corresponding to each video image and the definition confidence coefficient of the normalized gradient image corresponding to each video image; the license plate recognition result comprises a plurality of characters at preset positions.
2. The deep learning-based license plate recognition method of claim 1, wherein the step of calculating a gradient image corresponding to each target video image according to each x-edge image and each corresponding y-edge image comprises:
calculating the pixel value of any point in the gradient image corresponding to any target video image according to the following formulaG(x,y)
Figure 216745DEST_PATH_IMAGE001
GxThe pixel value of any point in the x-edge image corresponding to any target video image,Gythe pixel value of the point in the y edge image corresponding to any target video image is obtained;
the step of normalizing the pixel values of each gradient image to obtain each normalized gradient image comprises:
updating the pixel values of each of the gradient images according to the following formula:
Figure 427016DEST_PATH_IMAGE002
3. the deep learning-based license plate recognition method of claim 1, wherein the step of calculating the probability value of each statistical quantity in the total pixel quantity of the normalized gradient image comprises:
calculating any statistical quantity according to the following formulabiProbability value of total pixel number of the normalized gradient imagepi
Figure 199800DEST_PATH_IMAGE003
bj is the number of pixel points with the pixel value j in the normalized gradient image.
4. The deep learning-based license plate recognition method of claim 1, wherein the step of calculating the first cosine distance between the gradient probability histogram corresponding to the normalized gradient image and the gradient probability histogram distribution template of the clear license plate image comprises:
calculating a first cosine distance between a gradient probability histogram corresponding to the normalized gradient image and a gradient probability histogram distribution template of the clear license plate image according to the following formula:
Figure 802819DEST_PATH_IMAGE004
xiis the probability value corresponding to the pixel value i in the gradient probability histogram corresponding to the normalized gradient image,yiand obtaining a probability value corresponding to the pixel value i in the gradient probability histogram distribution template of the clear license plate image.
5. The deep learning-based license plate recognition method of claim 1, wherein the step of determining the sharpness confidence corresponding to the normalized gradient image according to the first cosine distance and the second cosine distance comprises:
when the first cosine distance is greater than the second cosine distance, determining the definition confidence coefficient corresponding to the normalized gradient image as the first cosine distance;
and when the first cosine distance is not greater than the second cosine distance, determining that the definition confidence coefficient corresponding to the normalized gradient image is 0.
6. The deep learning-based license plate recognition method of claim 1, wherein the step of obtaining the final recognition result of the target license plate according to the license plate recognition result corresponding to each video image and the definition confidence of the normalized gradient image corresponding to each video image comprises:
according to the arrangement sequence of the license plate recognition results, aiming at the h character in the target license plate, when the preferred recognition results of the h character in partial images in the video image are all k, and the preferred posterior probability of each partial imageS k And when the sum of the product of the definition confidence coefficients of the corresponding normalized gradient images is maximum, determining that the final recognition result of the h-th character of the target license plate is k.
7. The deep learning-based license plate recognition method of claim 1, wherein the construction process of the gradient probability histogram distribution template of the clear license plate image and the gradient probability histogram distribution template of the fuzzy license plate image comprises:
acquiring a sample video image, determining the sample video image with the definition greater than a preset threshold value as a clear image, and determining the sample video image with the definition not greater than the preset threshold value as a blurred image;
calculating a gradient probability histogram corresponding to each clear image and a gradient probability histogram corresponding to each fuzzy image;
calculating a first average value of the probability values corresponding to the same pixel values in the gradient probability histogram corresponding to each clear image, and constructing and obtaining a clear license plate image gradient probability histogram distribution template containing each first average value; and calculating a second average value of the probability values corresponding to the same pixel values in the gradient probability histograms corresponding to the fuzzy images, and constructing a fuzzy license plate image gradient probability histogram distribution template containing the second average values.
8. The deep learning-based license plate recognition method of claim 1, wherein the convolutional neural network is trained by a gradient back propagation algorithm, and a loss function of the convolutional neural network is as follows:
Figure 728181DEST_PATH_IMAGE005
wherein T is the total number of character categories, M is the number of character digits contained in a license plate, and y is the number of characters contained in the license plate when the obtained classification result is correctjIs 1, otherwise is 0;S j preferred posterior probabilities output for the convolutional neural network:
Figure 594506DEST_PATH_IMAGE006
a k estimating a resulting distance identified as a character k for the convolutional neural network,a j estimating a resulting distance identified as a character j for the convolutional neural network.
9. A license plate recognition device based on deep learning, the device comprising:
the video sampling module is used for sampling a monitoring video containing a target license plate based on a preset sampling period to obtain a plurality of video images containing the target license plate;
the gray level conversion module is used for carrying out gray level conversion on the plurality of video images to obtain a plurality of gray level video images; normalizing the multiple gray level video images to a preset size to obtain multiple target video images;
the filtering operation module is used for performing convolution operation on each target video image through a preset x-direction filter to obtain an x-edge image corresponding to each target video image; performing convolution operation on each target video image through a preset y-direction filter to obtain a y-edge image corresponding to each target video image; calculating a gradient image corresponding to each target video image according to each x edge image and each corresponding y edge image;
a histogram statistic module, configured to normalize the pixel values of each gradient image to obtain each normalized gradient image, perform histogram statistics on the normalized gradient image for each normalized gradient image to obtain a statistical number of each pixel value in the normalized gradient image, calculate a probability value of each statistical number in the total pixel number of the normalized gradient image, and construct a gradient probability histogram corresponding to the normalized gradient image and including each probability value;
the definition calculation module is used for acquiring a gradient probability histogram distribution template of a clear license plate image and a gradient probability histogram distribution template of a fuzzy license plate image which are obtained through pre-calculation, calculating a first cosine distance between a gradient probability histogram corresponding to the normalized gradient image and the gradient probability histogram distribution template of the clear license plate image and a second cosine distance between the gradient probability histogram corresponding to the normalized gradient image and the gradient probability histogram distribution template of the fuzzy license plate image, and determining a definition confidence coefficient corresponding to the normalized gradient image according to the first cosine distance and the second cosine distance; the clear license plate image gradient probability histogram distribution template is obtained by calculation according to a pre-acquired clear image, and the fuzzy license plate image gradient probability histogram distribution template is obtained by calculation according to a pre-acquired fuzzy image;
the license plate recognition module is used for inputting the video image corresponding to the normalized gradient image with the definition confidence coefficient greater than a preset confidence coefficient threshold value into a convolutional neural network obtained by pre-training to obtain a license plate recognition result corresponding to each video image; obtaining a final recognition result of the target license plate according to the license plate recognition result corresponding to each video image and the definition confidence coefficient of the normalized gradient image corresponding to each video image; the license plate recognition result comprises a plurality of characters at preset positions.
10. The deep learning-based license plate recognition device of claim 9, wherein the filtering operation module is specifically configured to calculate a pixel value of any point in a gradient image corresponding to any one of the target video images according to the following formulaG (x,y)
Figure 854586DEST_PATH_IMAGE007
GxThe pixel value of any point in the x-edge image corresponding to any target video image,Gythe pixel value of the point in the y edge image corresponding to any target video image is obtained;
the histogram statistic module is specifically configured to update the pixel value of each gradient image according to the following formula:
Figure 464559DEST_PATH_IMAGE008
CN202010176205.0A 2020-03-13 2020-03-13 License plate recognition method and device based on deep learning Active CN111340041B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010176205.0A CN111340041B (en) 2020-03-13 2020-03-13 License plate recognition method and device based on deep learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010176205.0A CN111340041B (en) 2020-03-13 2020-03-13 License plate recognition method and device based on deep learning

Publications (2)

Publication Number Publication Date
CN111340041A true CN111340041A (en) 2020-06-26
CN111340041B CN111340041B (en) 2023-03-24

Family

ID=71186110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010176205.0A Active CN111340041B (en) 2020-03-13 2020-03-13 License plate recognition method and device based on deep learning

Country Status (1)

Country Link
CN (1) CN111340041B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113177527A (en) * 2021-05-27 2021-07-27 安阳工学院 Vehicle type recognition method and device
CN113763378A (en) * 2021-09-22 2021-12-07 北京中电兴发科技有限公司 License plate image no-reference quality analysis scoring method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106845478A (en) * 2016-12-30 2017-06-13 同观科技(深圳)有限公司 The secondary licence plate recognition method and device of a kind of character confidence level
WO2018028306A1 (en) * 2016-08-11 2018-02-15 杭州海康威视数字技术股份有限公司 Method and device for recognizing license plate number
CN108388896A (en) * 2018-02-09 2018-08-10 杭州雄迈集成电路技术有限公司 A kind of licence plate recognition method based on dynamic time sequence convolutional neural networks

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018028306A1 (en) * 2016-08-11 2018-02-15 杭州海康威视数字技术股份有限公司 Method and device for recognizing license plate number
CN106845478A (en) * 2016-12-30 2017-06-13 同观科技(深圳)有限公司 The secondary licence plate recognition method and device of a kind of character confidence level
CN108388896A (en) * 2018-02-09 2018-08-10 杭州雄迈集成电路技术有限公司 A kind of licence plate recognition method based on dynamic time sequence convolutional neural networks

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
牛进才等: "车辆牌照识别算法的研究与实现", 《电子测量技术》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113177527A (en) * 2021-05-27 2021-07-27 安阳工学院 Vehicle type recognition method and device
CN113763378A (en) * 2021-09-22 2021-12-07 北京中电兴发科技有限公司 License plate image no-reference quality analysis scoring method
CN113763378B (en) * 2021-09-22 2023-07-18 北京中电兴发科技有限公司 Scoring method for license plate image non-reference quality analysis

Also Published As

Publication number Publication date
CN111340041B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
CN111582150B (en) Face quality assessment method, device and computer storage medium
CN111461134B (en) Low-resolution license plate recognition method based on generation countermeasure network
CN107545239B (en) Fake plate detection method based on license plate recognition and vehicle characteristic matching
CN111784747B (en) Multi-target vehicle tracking system and method based on key point detection and correction
CN111310850B (en) License plate detection model construction method and system, license plate detection method and system
CN107194418B (en) Rice aphid detection method based on antagonistic characteristic learning
CN110956615B (en) Image quality evaluation model training method and device, electronic equipment and storage medium
CN113505820B (en) Image recognition model training method, device, equipment and medium
CN113591967A (en) Image processing method, device and equipment and computer storage medium
CN111340041B (en) License plate recognition method and device based on deep learning
CN111553310B (en) Security inspection image acquisition method and system based on millimeter wave radar and security inspection equipment
Wazalwar et al. A design flow for robust license plate localization and recognition in complex scenes
CN113989794B (en) License plate detection and recognition method
Lee et al. Super-resolution of license plate images via character-based perceptual loss
CN112784494B (en) Training method of false positive recognition model, target recognition method and device
CN111667469B (en) Lung disease classification method, device and equipment
CN115083008A (en) Moving object detection method, device, equipment and storage medium
KR102219906B1 (en) Method and apparatus for automatically generating learning data for machine learning
CN116152758A (en) Intelligent real-time accident detection and vehicle tracking method
CN114663731B (en) Training method and system of license plate detection model, and license plate detection method and system
CN116110095A (en) Training method of face filtering model, face recognition method and device
CN112990225B (en) Image target identification method and device in complex environment
CN115345806A (en) Object detection method and device, electronic equipment and readable storage medium
CN113780492A (en) Two-dimensional code binarization method, device and equipment and readable storage medium
CN114549502A (en) Method and device for evaluating face quality, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant