CN106295634B - License plate image recognition processing method and device - Google Patents

License plate image recognition processing method and device Download PDF

Info

Publication number
CN106295634B
CN106295634B CN201510283124.XA CN201510283124A CN106295634B CN 106295634 B CN106295634 B CN 106295634B CN 201510283124 A CN201510283124 A CN 201510283124A CN 106295634 B CN106295634 B CN 106295634B
Authority
CN
China
Prior art keywords
histogram
license plate
plate image
offset
font
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510283124.XA
Other languages
Chinese (zh)
Other versions
CN106295634A (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201510283124.XA priority Critical patent/CN106295634B/en
Publication of CN106295634A publication Critical patent/CN106295634A/en
Application granted granted Critical
Publication of CN106295634B publication Critical patent/CN106295634B/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
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/63Scene text, e.g. street names
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Character Input (AREA)

Abstract

The invention discloses a processing method and a device for license plate image recognition, wherein in the method, a license plate image to be recognized is obtained, and the ground color and the font of the license plate image are subjected to threshold value distinguishing; and performing histogram offset processing on the ground color and performing histogram stretching processing on the font to obtain a license plate image recognition result. According to the technical scheme provided by the invention, the contrast and the color concentration of the license plate image can be improved, so that the license plate image is more in line with the visual effect, and the font is bright and vivid.

Description

License plate image recognition processing method and device
Technical Field
The invention relates to the field of video monitoring, in particular to a license plate image recognition processing method and device.
Background
Contrast typically refers to the ratio of black to white across the picture, i.e., a gradation from black to white. The larger the ratio of black to white, the more gradations from black to white, and the more rich the color representation. The contrast is of great importance to the visual effect, and under the normal condition, the larger the contrast is, the clearer and more striking the image is, and the more vivid and gorgeous color is; the smaller the contrast, the darker the whole picture.
In the related art, the contrast is usually adjusted by globally changing the pixel value of the target region according to the adjusted amplitude parameter, so that the pixel value larger than the preset threshold is larger, and the pixel value smaller than the preset threshold is smaller, thereby changing the global contrast effect. However, the drawback of this adjustment is that: such a contrast adjustment method cannot adaptively adjust to a desired contrast effect according to the characteristics of the region of interest.
Histogram equalization is a method for adjusting the contrast ratio using an image histogram in the field of image processing. The basic idea of histogram equalization is to transform the histogram of the original image into a form resembling a uniform distribution, thereby pulling apart the distribution of the gray-scale dynamic range of the image, so that the information of the image is in sharp contrast.
The histogram equalization technique provided in the related art generally equalizes the number of pixels distributed in 0-255 gray levels, and the core idea is to equalize the number of pixels in the equal-interval gray level range to enhance the contrast of the image, so as to be suitable for stretching the background which is darker or lighter as a whole. However, this approach has the disadvantages that: pixels in the gray scale range are distributed uniformly, but cannot be enhanced in a self-adaptive manner according to specific requirements; which for an ideal license plate image pixel histogram distribution should be a histogram with two peaks spread out over a certain distance.
For video monitoring of vehicles in the current road scene, due to the influence of factors such as light, scene, vehicle motion, camera position and the like, the effect of video or snapshot frame license plate images is unsatisfactory, and the effect is expressed that the difference between the background color of the license plate images and the character brightness is small, the background color is not pure enough, in other words, the visual contrast of human eyes to the license plate images is not enough, and the content to be displayed on the license plate images is difficult to clearly identify.
In summary, the technical solutions provided in the related arts are not ideal enough for enhancing the license plate image, and affect the visual effect of human eyes.
Disclosure of Invention
The embodiment of the invention provides a processing method and a processing device for license plate image recognition, which are used for at least solving the problems that the recognition degree of the license plate image display information is relatively limited and the visual effect of human eyes is influenced by the technical scheme provided by the related technology.
According to one aspect of the invention, a processing method for license plate image recognition is provided.
The processing method for license plate image recognition according to the embodiment of the invention comprises the following steps: acquiring a license plate image to be recognized, and performing threshold distinguishing on the ground color and the font of the license plate image; and performing histogram offset processing on the ground color and performing histogram stretching processing on the font to obtain a license plate image recognition result.
Preferably, thresholding the base color from the font includes: performing histogram original distribution statistics according to the position information and the size information of the license plate image to obtain a statistical result; performing histogram merging processing on the original distribution histogram according to the statistical result to obtain a merged processing histogram; and judging to obtain a boundary threshold value of the ground color and the font according to the merging processing histogram.
Preferably, the merged processed histogram is obtained using the following formula:
Figure BDA0000726960360000021
wherein, Hist [ i ]]Is the histogram statistical distribution of the ith gray scale, Dis [ m ]]M is more than or equal to 0 and less than or equal to num which is the number of the combined gray scales, and tempSum is from Dis [ m ]]Start to Dis [ m +1]]And merging the finished gray-scale distributions.
Preferably, the determining the boundary threshold according to the merged histogram includes: obtaining the value of a parameter tempSum according to the ratio of the total number of pixels of the license plate image to a preset adjustment coefficient; according to the obtained values, a calculation formula is adopted
Figure BDA0000726960360000022
Solving a boundary threshold value k; wherein Add [ m ]]Is a histogram of the mth combined gray-scale distribution.
Preferably, the histogram shift processing of the base color includes: performing histogram offset processing on a part of the histogram with the gray scale smaller than or equal to the demarcation threshold value in the merged histogram to obtain a background color histogram, wherein the gray scale coordinate distribution of the background color histogram needs to meet the following requirements: grayscale [ i ] ═ Add [ i + Offset ]; i + Offset is not less than 0 and not more than k, OffSet is Offset and OffSet is not less than Dis [1 ].
Preferably, the histogram stretching process on the font includes: and performing histogram stretching processing on the part of the merged histogram with the gray scale larger than the demarcation threshold value to obtain a font histogram, wherein the gray scale coordinate distribution of the font histogram needs to meet the following requirements: grayScale [ i ] ═ k-Offset + (i-k) × (T-1-k-Offset)/(num-Bnum); k is more than or equal to num, and Bnum is the number of the ground color gray scales.
Preferably, after the histogram offset processing is performed on the ground color and the histogram stretching processing is performed on the font, the method further includes: performing histogram redistribution statistics on the gray scale coordinate distribution of the background color histogram and the gray scale coordinate distribution of the font histogram to obtain a redistribution histogram; acquiring a pixel mapping curve by adopting an original distribution histogram and a redistribution histogram; and adjusting the license plate image recognition result according to the pixel mapping curve.
According to another aspect of the invention, a processing device for license plate image recognition is provided.
The processing device for license plate image recognition according to the embodiment of the invention comprises: the distinguishing module is used for acquiring a license plate image to be recognized and distinguishing the ground color and the font of the license plate image by a threshold value; and the recognition module is used for performing histogram offset processing on the ground color and performing histogram stretching processing on the font to obtain a license plate image recognition result.
Preferably, the distinguishing module comprises: the acquisition unit is used for carrying out histogram original distribution statistics according to the position information and the size information of the license plate image to acquire a statistical result; the processing unit is used for carrying out histogram merging processing on the original distribution histogram according to the statistical result to obtain a merging processing histogram; and the judging unit is used for judging the boundary threshold value of the ground color and the font according to the merging processing histogram.
Preferably, the processing unit is configured to obtain a merging processing histogram by using the following formula:
Figure BDA0000726960360000031
wherein, Hist [ i ]]Is the histogram statistical distribution of the ith gray scale, Dis [ m ]]M is more than or equal to 0 and less than or equal to num which is the number of the combined gray scales, and tempSum is from Dis [ m ]]Start to Dis [ m +1]]And merging the finished gray-scale distributions.
Preferably, the judging unit includes: the acquisition subunit is used for acquiring the value of the parameter tempSum according to the ratio of the total number of pixels of the license plate image to a preset adjustment coefficient; a calculating subunit, configured to adopt a calculation formula according to the obtained value
Figure BDA0000726960360000032
Solving a boundary threshold value k; wherein Add [ m ]]Is a histogram of the mth combined gray-scale distribution.
Preferably, the identification module is configured to perform histogram offset processing on a part of the histogram in which the gray scale in the merged histogram is smaller than or equal to the demarcation threshold value to obtain a background color histogram, where the gray scale coordinate distribution of the background color histogram needs to satisfy: grayscale [ i ] ═ Add [ i + Offset ]; i + Offset is not less than 0 and not more than k, OffSet is Offset and OffSet is not less than Dis [1 ].
Preferably, the identification module is configured to perform histogram stretching processing on a portion, in the merged histogram, of which the gray level is greater than the demarcation threshold value to obtain a font histogram, where a gray level coordinate distribution of the font histogram needs to satisfy: grayScale [ i ] ═ k-Offset + (i-k) × (T-1-k-Offset)/(num-Bnum); k is more than or equal to num, and Bnum is the number of the ground color gray scales.
Preferably, the above apparatus further comprises: the statistical module is used for carrying out histogram redistribution statistics on the gray scale coordinate distribution of the background color histogram and the gray scale coordinate distribution of the font histogram to obtain a redistribution histogram; the acquisition module is used for acquiring a pixel mapping curve by adopting the original distribution histogram and the redistribution histogram; and the adjusting module is used for adjusting the license plate image recognition result according to the pixel mapping curve.
According to the embodiment of the invention, the license plate image to be recognized is obtained, and the ground color and the font of the license plate image are subjected to threshold value distinguishing; the method and the device have the advantages that the histogram offset processing is carried out on the ground color, the histogram stretching processing is carried out on the font, the license plate image recognition result is obtained, the problems that the recognition degree of the license plate image display information is limited and the visual resolution of human eyes is affected by the technical scheme provided in the related technology are solved, the contrast and the level of the license plate image can be improved, the ground color of the license plate image is more in line with the visual effect, and the font is bright and vivid.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a processing method for license plate image recognition according to an embodiment of the present invention;
FIG. 2 is a flow chart of a processing method for license plate image recognition according to a preferred embodiment of the present invention;
FIG. 3a is a schematic diagram illustrating an effect of an original image of a license plate image;
FIG. 3b is a schematic diagram illustrating the effect of adjusting the contrast ratio based on the original image of the license plate image shown in FIG. 3 a;
FIG. 3c is a schematic diagram illustrating an effect of processing the license plate image original image displayed in FIG. 3a by using a histogram equalization method;
FIG. 3d is a schematic diagram illustrating an effect of processing by using the technical solution provided by the preferred embodiment of the present invention on the basis of the original image of the license plate image shown in FIG. 3 a;
FIG. 4 is a block diagram of a license plate image recognition processing device according to an embodiment of the invention;
fig. 5 is a block diagram of a license plate image recognition processing device according to a preferred embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
In the following description, embodiments of the present application will be described with reference to acts and symbolic representations of operations that are performed by one or more computers, unless indicated otherwise. The computer includes various products such as a personal computer, a server, a mobile terminal, and the like, and devices having a processing chip, such as a Central Processing Unit (CPU), a single chip, a Digital Signal Processor (DSP), and the like, may be referred to as a computer. As such, it will be understood that such acts and operations, which are at times referred to as being computer-executed, include the manipulation by the processing unit of the computer of electrical signals representing data in a structured form. This manipulation transforms the data or maintains it at locations in the computer's memory system, which reconfigures or otherwise alters the operation of the computer in a manner well understood by those skilled in the art. The data structures that maintain the data are physical locations of the memory that have particular properties defined by the format of the data. However, while the invention is described in the foregoing context, it is not meant to be limiting, as those of skill in the art will appreciate that various aspects of the acts and operations described hereinafter may also be implemented in hardware.
Turning to the drawings, wherein like reference numerals refer to like elements, the principles of the present application are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with regard to alternative embodiments that are not explicitly described herein.
The following embodiments may be applied to a computer, for example: application to Personal Computers (PCs). But also to a mobile terminal currently adopting an intelligent operating system, and is not limited thereto. There is no particular requirement for the operating system of the computer or mobile terminal as long as it is capable of detecting contact, determining whether the contact complies with a predetermined rule, and implementing a corresponding function according to the attributes of the contact.
Fig. 1 is a flowchart of a processing method for license plate image recognition according to an embodiment of the present invention. As shown in fig. 1, the method may comprise the following process steps:
step S102: acquiring a license plate image to be recognized, and performing threshold distinguishing on the ground color and the font of the license plate image;
step S104: and performing histogram offset processing on the ground color of the license plate image and performing histogram stretching processing on the font of the license plate image to obtain a license plate image recognition result.
The technical scheme provided in the related technology has a relatively limited recognition degree on the display information of the license plate image, and the visual resolution of human eyes is influenced. The method shown in fig. 1 is adopted to perform adaptive contrast enhancement on the license plate image, threshold judgment is firstly performed on the background color and the font of the license plate image, and then enhancement processing is respectively performed on the background color and the font, so that the problems that the recognition degree of the technical scheme provided in the related technology on the license plate image display information is relatively limited and the visual resolution of human eyes is influenced are solved, the contrast and the level of the license plate image can be improved, the background color of the license plate image is more consistent with the visual effect, and the font is bright and vivid.
Preferably, in step S102, thresholding the base color from the font may include the following operations:
step S1: performing histogram original distribution statistics according to the position information and the size information of the license plate image to obtain a statistical result;
step S2: performing histogram merging processing on the original distribution histogram according to the statistical result to obtain a merged processing histogram;
step S3: and judging to obtain a boundary threshold value of the ground color and the font according to the merging processing histogram.
In a preferred embodiment, taking the Y channel of the YUV channel as an example to perform luminance histogram statistics, the dynamic range of display of the mainstream image adopted in the related art is 8 bits (0-255), and therefore, the range of luminance grayscale of the histogram of the license plate image is 0-255, and the expression is as follows:
Hist[i]=Num[i],0≤i≤255;
wherein i is a pixel value to be counted in the target area, Num [ i ] is the pixel number of the ith gray scale, and Hist [ i ] is the histogram statistical distribution.
Figure BDA0000726960360000061
Where sumNum is the total number of pixels.
It should be noted that the manner of acquiring the position information and the size information of the license plate image may adopt a solution provided in the prior art, but is not specifically limited in the embodiment of the present invention.
Histogram merging generally refers to merging histograms of adjacent gray levels in a certain range into one gray level according to a set threshold, where the threshold refers to the number of pixels.
Preferably, in step S2, the merging process histogram may be obtained by using the following formula:
Figure BDA0000726960360000062
wherein, Hist [ i ] is the histogram statistical distribution of the ith gray scale, Dis [ m ] is the combined gray scale distribution, m is more than or equal to 0 and less than or equal to num, num is the number of the combined gray scales, and tempSum is the combined result of the gray scale distribution from Dis [ m ] to Dis [ m +1] end.
Taking the first merged gray level as an example, the cumulative sum tempSum of the numbers of the merged gray level histograms is counted from gray level 0:
Figure BDA0000726960360000063
the condition of the threshold for judging whether tempSum ends accumulation is that tempSum is greater than or equal to addthrenddnum, and adthrendthrenddnum is sumNum/256, at this time, the first combined gray scale is Dis [1] ═ j, and Dis [0] ═ 0.
From the above analysis, the general formula of tempSum can be derived as follows:
Figure BDA0000726960360000064
wherein Dis [ m ] is the combined gray scale distribution, m is more than or equal to 0 and less than or equal to num, and num is the number of the combined gray scales;
the histogram merged histogram distribution can be obtained according to the logic and is defined as Add [ i ], i ═ Dis [ m ], and m is more than or equal to 0 and less than or equal to num.
Preferably, in step S3, determining the boundary threshold according to the histogram after the merging process may include the following operations:
step S4: obtaining the value of a parameter tempSum according to the ratio of the total number of pixels of the license plate image to a preset adjustment coefficient;
step S5: according to the obtained value, the following calculation formula can be adopted:
Figure BDA0000726960360000071
solving a boundary threshold value k; wherein Add [ m ]]Is a histogram of the mth combined gray-scale distribution.
In a preferred embodiment, the demarcation threshold value described above may be determined by employing the following formula:
Figure BDA0000726960360000072
when tempSum is larger than or equal to carthrendnum, k is a boundary threshold, carthrendnum is sumNum/index, index is a threshold adjusting coefficient, and Add [ m ] is the accumulated sum of the combined gray-scale distribution.
If tempSum is larger than or equal to carthrendnum, and carthrendnum is sumNum/index, the threshold gray scale is k, sumNum is the total number of pixels in the license plate image area, the number of background gray scales is Bnum is k, and index is a threshold adjustment coefficient, and the default is 2.
Preferably, in step S104, performing histogram shift processing on the base color may include the steps of:
step S6: performing histogram offset processing on a part of the histogram with the gray scale smaller than or equal to the demarcation threshold value in the merged histogram to obtain a background color histogram, wherein the gray scale coordinate distribution of the background color histogram needs to meet the following requirements: grayscale [ i ] ═ Add [ i + Offset ]; i + Offset is not less than 0 and not more than k, OffSet is Offset and OffSet is not less than Dis [1 ].
Histogram shifting generally refers to shifting a histogram corresponding to a gray level to another gray level, which is represented as a shift of the histogram, i.e., for an image, an adjustment for making pixels of the image become bright or dark.
In a preferred implementation process, the gray scale coordinate distribution of the background color histogram obtained by performing histogram offset processing on the background color needs to satisfy: grayscale [ i ] ═ Add [ i + Offset ]; wherein i is more than or equal to 0 and Offset is less than or equal to k, OffSet is Offset and OffSet is less than or equal to Dis [1 ].
Preferably, in step S104, performing histogram stretching processing on the font may include the following operations:
step S7: and performing histogram stretching processing on the part of the merged histogram with the gray scale larger than the demarcation threshold value to obtain a font histogram, wherein the gray scale coordinate distribution of the font histogram needs to meet the following requirements: grayScale [ i ] ═ k-Offset + (i-k) × (T-1-k-Offset)/(num-Bnum); k is more than or equal to num, and Bnum is the number of the ground color gray scales.
And histogram stretching, which is opposite to the operation process of histogram merging, wherein the histogram stretching is realized by expanding the gray scale corresponding to the statistical histogram to a set gray scale range in a specific mode.
In the preferred implementation process, if the brightness gray scale range of the histogram of the license plate image is 0-255, the histogram stretching enhances the license plate image, that is, the histogram with the gray scale of more than k is uniformly distributed between [ k +1-OffSet, 255], and the gray scale coordinate distribution of the font histogram satisfies:
grayScale [ i ] ═ k-Offset + (i-k) × (255-k-Offset)/(num-Bnum), where k < i ≦ num.
Preferably, after the histogram shift processing is performed on the ground color and the histogram stretch processing is performed on the font in step S104, the following steps may be further included:
step S8: performing histogram redistribution statistics on the gray scale coordinate distribution of the background color histogram and the gray scale coordinate distribution of the font histogram to obtain a redistribution histogram;
step S9: acquiring a pixel mapping curve by adopting an original distribution histogram and a redistribution histogram;
step S10: and adjusting the license plate image recognition result according to the pixel mapping curve.
In a preferred embodiment, a new histogram distribution newHist can be obtained according to the histogram and the gray level redistribution, where the gray level position of the histogram is gray scale, i.e. the effective gray level where the number of histograms is not zero:
newHist[grayScale[m]]=Add[i],i=Dis[m],0≤m≤num;
the pixel mapping curve obtained from the original distribution and redistribution of the histogram is:
newHist[i]=reflect[Hist[i]]→reflect[i],0≤i≤255;
the implementation method of the reflex [ i ] comprises the following steps:
(1) traversing num merging gray scales, namely i performs circulation once in [0, 255 ];
(2) comparing the traversal value i with the size of the grayScale [ m ] in each traversal, and increasing i by 1 in each traversal;
(3) if the grayScale [ m ] is not less than i, assigning the grayScale [ m ] to a reflect [ i ], and increasing m by 1; otherwise, m remains unchanged.
Fig. 2 is a flowchart of a processing method for license plate image recognition according to a preferred embodiment of the present invention. As shown in fig. 2, the process may include the following process steps:
step S202: acquiring an original video single-frame image;
step S204: detecting the brightness and/or the chromaticity of the region where the license plate image in the video single-frame image is located;
step S206: obtaining the position information and the size information of the license plate image according to the detection;
step S208: counting a license plate image brightness histogram according to the license plate image position information and the size information;
step S210: carrying out histogram merging processing on the statistical histogram;
step S212: judging the threshold boundary according to the histogram information; if the histogram is the histogram with the gray level smaller than the threshold, go to step S214; if the gray level is larger than the histogram of the threshold value, go to step S216;
step S214: performing histogram offset processing on the ground color (the histogram with the gray scale smaller than the threshold value) of the license plate image;
step S216: carrying out histogram stretching processing on a license plate image font (a histogram with a gray scale larger than a threshold value);
step S218: enhancing the license plate image according to the obtained pixel mapping curve so as to improve the visual effect of the license plate image;
step S220: and outputting the enhanced results of the license plate image font and the ground color.
Fig. 3a to 3d are schematic diagrams illustrating comparison between the license plate image recognition processing method according to the preferred embodiment of the present invention and the related art processing method based on the original image display effect of the license plate image. Fig. 3a is a schematic diagram of an effect of a license plate image original, fig. 3b is a schematic diagram of an effect of performing contrast adjustment on the basis of the license plate image original displayed in fig. 3a, fig. 3c is a schematic diagram of an effect of performing processing in a histogram equalization manner on the basis of the license plate image original displayed in fig. 3a, and fig. 3d is a schematic diagram of an effect of performing processing on the basis of the license plate image original displayed in fig. 3a by using the technical solution provided in the preferred embodiment of the present invention. As shown in fig. 3a to 3d, although the contrast adjustment method and the histogram equalization method provided in the related art can improve the display effect of the license plate image presented by the original image to a certain extent, compared with the prior art, the technical solution provided in the embodiment of the present invention better conforms to the visual effect of the license plate image after the original image of the license plate image is identified.
Fig. 4 is a block diagram of a license plate image recognition processing device according to an embodiment of the invention. As shown in fig. 4, the processing device for license plate image recognition may include: the distinguishing module 10 is used for acquiring a license plate image to be recognized and distinguishing a base color and a font of the license plate image by a threshold value; and the recognition module 20 is configured to perform histogram offset processing on the ground color and perform histogram stretching processing on the font to obtain a license plate image recognition result.
The device shown in fig. 4 is adopted to solve the problems that the technical scheme provided by the related technology has limited recognition degree on the display information of the license plate image and influences the visual resolution of human eyes, and further improve the contrast and the level of the license plate image, so that the ground color of the license plate image is more consistent with the visual effect, and the font is bright and vivid.
Preferably, as shown in fig. 5, the distinguishing module 10 may include: the acquiring unit 100 is configured to perform histogram original distribution statistics according to the position information and the size information of the license plate image, and acquire a statistical result; the processing unit 102 is configured to perform histogram merging processing on the original distribution histogram according to the statistical result to obtain a merged processing histogram; and the judging unit 104 is configured to judge a boundary threshold of the ground color and the font according to the merging processing histogram.
Preferably, the processing unit 102 is configured to obtain a merging processing histogram by using the following formula:
Figure BDA0000726960360000091
wherein, Hist [ i ]]Is the histogram statistical distribution of the ith gray scale, Dis [ m ]]M is more than or equal to 0 and less than or equal to num which is the number of the combined gray scales, and tempSum is from Dis [ m ]]Start to Dis [ m +1]]And merging the finished gray-scale distributions.
Preference is given toAlternatively, the determining unit 104 may include: an obtaining subunit (not shown in the figure), configured to obtain a value of the parameter tempSum according to a ratio of a total number of pixels of the license plate image to a preset adjustment coefficient; a calculating subunit (not shown in the figure) configured to adopt a calculation formula according to the obtained value
Figure BDA0000726960360000101
Solving a boundary threshold value k; wherein Add [ m ]]Is a histogram of the mth combined gray-scale distribution.
Preferably, the identifying module 20 is configured to perform histogram offset processing on a partial histogram of which a gray level in the merged histogram is smaller than or equal to a demarcation threshold value to obtain a background color histogram, where a gray level coordinate distribution of the background color histogram needs to satisfy: grayscale [ i ] ═ Add [ i + Offset ]; i + Offset is not less than 0 and not more than k, OffSet is Offset and OffSet is not less than Dis [1 ].
Preferably, the identifying module 20 is configured to perform histogram stretching processing on a portion, in the merged histogram, of which the gray level is greater than the demarcation threshold value, to obtain a font histogram, where a gray level coordinate distribution of the font histogram needs to satisfy: grayScale [ i ] ═ k-Offset + (i-k) × (T-1-k-Offset)/(num-Bnum); k is more than or equal to num, Bnum is the number of the ground color gray scales, and num is the total number of the combined gray scales.
Preferably, as shown in fig. 5, the apparatus may further include: the statistical module 30 is configured to perform histogram redistribution statistics on the gray scale coordinate distribution of the ground color histogram and the gray scale coordinate distribution of the font histogram to obtain a redistribution histogram; an obtaining module 40, configured to obtain a pixel mapping curve by using the original distribution histogram and the redistribution histogram; and the adjusting module 50 is used for adjusting the license plate image recognition result according to the pixel mapping curve.
From the above description, it can be seen that the above embodiments achieve the following technical effects (it is to be noted that these effects are those that certain preferred embodiments can achieve): by adopting the technical scheme provided by the embodiment of the invention, the histogram information of the license plate image area is fully utilized, the ground color and the font are distinguished according to the preset threshold value, and the corresponding histogram processing is carried out, so that the corresponding mapping curve is obtained to improve the contrast of the license plate image. Through the combination of the histogram threshold values, the histogram can extract the main information more effectively; the threshold value discrimination of the ground color and the font of the license plate image is convenient for respectively carrying out different histogram conversion processing on the two areas; the histogram deviation and the uniform stretching are convenient for the contrast level of information to be distinct, thereby being beneficial to the license plate image ground color to be more in line with the visual effect and enabling the character to be bright and distinct.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A processing method for license plate image recognition is characterized by comprising the following steps:
acquiring a license plate image to be recognized, and carrying out threshold value distinguishing on the ground color and the font of the license plate image;
and performing histogram offset processing on the ground color and performing histogram stretching processing on the font to obtain a license plate image recognition result.
2. The method of claim 1, wherein thresholding the base color from the font comprises:
performing histogram original distribution statistics according to the position information and the size information of the license plate image to obtain a statistical result;
performing histogram merging processing on the original distribution histogram according to the statistical result to obtain a merged processing histogram;
and judging to obtain a boundary threshold value of the ground color and the font according to the merging processing histogram.
3. The method of claim 2, wherein the merged process histogram is obtained using the following equation:
Figure FDA0000726960350000011
wherein, Hist [ i ] is the histogram statistical distribution of the ith gray scale, Dis [ m ] is the combined gray scale distribution, m is more than or equal to 0 and less than or equal to num, num is the number of the combined gray scales, and tempSum is the combined result of the gray scale distribution from Dis [ m ] to Dis [ m +1] end.
4. The method of claim 3, wherein determining the cut-off threshold from the merged histogram comprises:
obtaining the value of a parameter tempSum according to the ratio of the total number of pixels of the license plate image to a preset adjustment coefficient;
according to the obtained value, a calculation formula is adopted
Figure FDA0000726960350000012
Solving the demarcation threshold value k; wherein Add [ m ]]Is a histogram of the mth combined gray-scale distribution.
5. The method of claim 4, wherein histogram shifting the base color comprises:
performing histogram offset processing on a part of the histogram with the gray scale less than or equal to the demarcation threshold value in the merged histogram to obtain a background color histogram, wherein the gray scale coordinate distribution of the background color histogram needs to satisfy: grayscale [ i ] ═ Add [ i + Offset ]; i + Offset is not less than 0 and not more than k, OffSet is Offset and OffSet is not less than Dis [1 ].
6. The method of claim 5, wherein histogram stretching the font comprises:
and performing histogram stretching processing on the part of the merged histogram, of which the gray level is greater than the demarcation threshold value, to obtain a font histogram, wherein the gray level coordinate distribution of the font histogram needs to meet the following requirements:
grayScale [ i ] ═ k-Offset + (i-k) × (T-1-k-Offset)/(num-Bnum); k is more than or equal to num, and Bnum is the number of the ground color gray scales.
7. The method of claim 6, further comprising, after histogram shifting the base color and histogram stretching the font:
performing histogram redistribution statistics on the gray scale coordinate distribution of the ground color histogram and the gray scale coordinate distribution of the font histogram to obtain a redistribution histogram;
acquiring a pixel mapping curve by adopting the original distribution histogram and the redistribution histogram;
and adjusting the license plate image recognition result according to the pixel mapping curve.
8. A processing device for license plate image recognition is characterized by comprising:
the distinguishing module is used for acquiring a license plate image to be recognized and distinguishing a base color and a font of the license plate image by a threshold value;
and the recognition module is used for performing histogram offset processing on the ground color and performing histogram stretching processing on the font to obtain a license plate image recognition result.
9. The apparatus of claim 8, wherein the means for distinguishing comprises:
the acquisition unit is used for carrying out histogram original distribution statistics according to the position information and the size information of the license plate image to acquire a statistical result;
the processing unit is used for carrying out histogram merging processing on the original distribution histogram according to the statistical result to obtain a merging processing histogram;
and the judging unit is used for judging to obtain the boundary threshold value of the ground color and the font according to the merging processing histogram.
10. The apparatus according to claim 9, wherein the processing unit is configured to obtain the merged histogram by using the following formula:
Figure FDA0000726960350000021
wherein, Hist [ i ] is the histogram statistical distribution of the ith gray scale, Dis [ m ] is the combined gray scale distribution, m is more than or equal to 0 and less than or equal to num, num is the number of the combined gray scales, and tempSum is the combined result of the gray scale distribution from Dis [ m ] to Dis [ m +1] end.
11. The apparatus according to claim 10, wherein the judging unit includes:
the obtaining subunit is used for obtaining the value of a parameter tempSum according to the ratio of the total number of pixels of the license plate image to a preset adjusting coefficient;
a calculating subunit, configured to adopt a calculation formula according to the obtained value
Figure FDA0000726960350000031
Solving the demarcation threshold value k; wherein Add [ m ]]Is a histogram of the mth combined gray-scale distribution.
12. The apparatus of claim 11, wherein the identifying module is configured to perform histogram shift processing on a portion of the merged histogram having a gray level less than or equal to the demarcation threshold to obtain an under color histogram, and a gray level coordinate distribution of the under color histogram needs to satisfy: grayscale [ i ] ═ Add [ i + Offset ]; i + Offset is not less than 0 and not more than k, OffSet is Offset and OffSet is not less than Dis [1 ].
13. The apparatus of claim 12, wherein the identifying module is configured to perform histogram stretching on a portion of the merged histogram where a gray level is greater than the demarcation threshold value to obtain a font histogram, where a gray level coordinate distribution of the font histogram needs to satisfy:
grayScale [ i ] ═ k-Offset + (i-k) × (T-1-k-Offset)/(num-Bnum); k is more than or equal to num, and Bnum is the number of the ground color gray scales.
14. The apparatus of claim 13, further comprising:
the statistic module is used for carrying out histogram redistribution statistic on the gray scale coordinate distribution of the ground color histogram and the gray scale coordinate distribution of the font histogram to obtain a redistribution histogram;
an obtaining module, configured to obtain a pixel mapping curve by using the original distribution histogram and the redistribution histogram;
and the adjusting module is used for adjusting the license plate image recognition result according to the pixel mapping curve.
CN201510283124.XA 2015-05-28 2015-05-28 License plate image recognition processing method and device Active CN106295634B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510283124.XA CN106295634B (en) 2015-05-28 2015-05-28 License plate image recognition processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510283124.XA CN106295634B (en) 2015-05-28 2015-05-28 License plate image recognition processing method and device

Publications (2)

Publication Number Publication Date
CN106295634A CN106295634A (en) 2017-01-04
CN106295634B true CN106295634B (en) 2021-04-02

Family

ID=57635482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510283124.XA Active CN106295634B (en) 2015-05-28 2015-05-28 License plate image recognition processing method and device

Country Status (1)

Country Link
CN (1) CN106295634B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6985612B2 (en) * 2001-10-05 2006-01-10 Mevis - Centrum Fur Medizinische Diagnosesysteme Und Visualisierung Gmbh Computer system and a method for segmentation of a digital image
CN101877050B (en) * 2009-11-10 2012-08-22 青岛海信网络科技股份有限公司 Automatic extracting method for characters on license plate
CN103778900B (en) * 2012-10-23 2016-04-20 浙江大华技术股份有限公司 A kind of image processing method and system
CN103353982B (en) * 2013-05-15 2016-03-09 中山大学 A kind of tone mapping method based on histogram equalization
CN103530608A (en) * 2013-10-10 2014-01-22 智博锐视(北京)科技有限公司 Vehicle type judgment method and vehicle type judgment device

Also Published As

Publication number Publication date
CN106295634A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
Ma et al. Objective quality assessment for color-to-gray image conversion
CN107507144B (en) Skin color enhancement processing method and device and image processing device
CN111784609B (en) Image dynamic range compression method, device and computer readable storage medium
CN108805829B (en) Image data processing method, device, equipment and computer readable storage medium
US20140079319A1 (en) Methods for enhancing images and apparatuses using the same
CN110718069B (en) Image brightness adjusting method and device and storage medium
CN111724430A (en) Image processing method and device and computer readable storage medium
CN113596573B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN110536172B (en) Video image display adjusting method, terminal and readable storage medium
CN108806638B (en) Image display method and device
Lyu et al. No-reference quality metric for contrast-distorted image based on gradient domain and HSV space
CN112419270B (en) No-reference image quality evaluation method and device under meta-learning and computer equipment
Chen et al. Blind quality index for tone-mapped images based on luminance partition
CN108961209B (en) Pedestrian image quality evaluation method, electronic device and computer readable medium
CN113592776A (en) Image processing method and device, electronic device and storage medium
CN115797607A (en) Image optimization processing method for enhancing VR real effect
CN111160215A (en) Image identifier extraction device, and brightness adjustment method and device of image identifier
CN108921869B (en) Image binarization method and device
CN109982012B (en) Image processing method and device, storage medium and terminal
CN113743378A (en) Fire monitoring method and device based on video
CN112906611A (en) Well lid detection method and device, electronic equipment and storage medium
CN111797694A (en) License plate detection method and device
CN106295634B (en) License plate image recognition processing method and device
CN110633705A (en) Low-illumination imaging license plate recognition method and device
CN107274456A (en) A kind of recognition methods of picture format and device

Legal Events

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