CN108108734B - License plate recognition method and device - Google Patents

License plate recognition method and device Download PDF

Info

Publication number
CN108108734B
CN108108734B CN201611052182.2A CN201611052182A CN108108734B CN 108108734 B CN108108734 B CN 108108734B CN 201611052182 A CN201611052182 A CN 201611052182A CN 108108734 B CN108108734 B CN 108108734B
Authority
CN
China
Prior art keywords
license plate
character
segmentation
vertical projection
plate image
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
CN201611052182.2A
Other languages
Chinese (zh)
Other versions
CN108108734A (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 CN201611052182.2A priority Critical patent/CN108108734B/en
Publication of CN108108734A publication Critical patent/CN108108734A/en
Application granted granted Critical
Publication of CN108108734B publication Critical patent/CN108108734B/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/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • 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/63Scene text, e.g. street names
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Character Input (AREA)
  • Traffic Control Systems (AREA)

Abstract

The embodiment of the application provides a license plate recognition method and device, and relates to the technical field of intelligent traffic. The method comprises the following steps: obtaining a license plate image area of a license plate number to be identified; determining character segmentation points in the license plate image area; according to the determined character segmentation points, obtaining alternative character region segmentation modes corresponding to the license plate image region; for each alternative character region segmentation mode, performing character recognition on the license plate image region to obtain a character recognition result; and acquiring a license plate number corresponding to the license plate image area according to the acquired character recognition result. By applying the technical scheme in the embodiment of the application to license plate recognition, the compatibility of license plate recognition can be improved.

Description

License plate recognition method and device
Technical Field
The application relates to the technical field of intelligent traffic, in particular to a license plate recognition method and device.
Background
The license plate is the 'ID card' of the vehicle and is important information which is different from other motor vehicles. The license plate recognition technology is widely applied to scenes such as a gate, a parking lot, an electronic police and the like to acquire license plate information of vehicles in the scenes, and plays the power of an intelligent traffic algorithm in many aspects such as public security management and the like.
In the prior art, when a license plate number in a license plate image to be recognized is recognized, one of the license plate images is matched with a plurality of license plate templates which are stored in advance, and then the license plate number is recognized. The specific process is as follows: and positioning a license plate region in the license plate image to be recognized, performing character segmentation on the license plate image to be recognized according to the selected license plate template, and performing character recognition on each segmented character region. And if the character recognition is successful, the license plate template is considered to be successfully matched, and the character recognition result is determined as the license plate number of the license plate image to be recognized. If the character recognition is unsuccessful, another license plate template is selected, and the process is repeated.
The characters contained in the license plate are different from each other in different types. In order to identify these types of license plates, a license plate template is usually constructed for each type of license plate.
Under normal conditions, when the method is adopted for license plate recognition, the license plate number in the license plate conforming to the type can be recognized. However, if the type of the license plate in the license plate image to be recognized is not within the above type range, the license plate region cannot be correctly segmented according to the above license plate template, and the license plate region cannot be recognized by the above method, so that the compatibility of the license plate recognition method in the prior art is not high.
Disclosure of Invention
The embodiment of the application aims to provide a license plate recognition method and a license plate recognition device so as to improve the compatibility of license plate recognition. The specific technical scheme is as follows.
In order to achieve the above object, the present application discloses a license plate recognition method, including:
obtaining a license plate image area of a license plate number to be identified;
determining character segmentation points in the license plate image area;
according to the determined character segmentation points, obtaining alternative character region segmentation modes corresponding to the license plate image region;
for each alternative character region segmentation mode, performing character recognition on the license plate image region to obtain a character recognition result;
and acquiring a license plate number corresponding to the license plate image area according to the acquired character recognition result.
Optionally, the step of determining the character segmentation points in the license plate image region includes:
determining a vertical projection value of each pixel column in the license plate image area according to a vertical projection method;
and determining character segmentation points according to the determined vertical projection values.
Optionally, the step of determining character segmentation points according to the determined vertical projection values includes:
determining the width of a sliding window;
calculating a first threshold corresponding to each vertical projection value according to the width and each determined vertical projection value;
determining character segmentation points according to each vertical projection value and the corresponding first threshold value;
wherein the step of calculating a first threshold corresponding to each vertical projection value according to the width and the determined vertical projection values comprises:
calculating a first threshold corresponding to each vertical projection value according to the following mode:
according to the width, selecting a first continuous number of vertical projection values including a target vertical projection value according to the arrangement sequence of the vertical projection values, wherein the arrangement sequence of the vertical projection values is consistent with the arrangement sequence of pixel columns in the license plate image area, and the target vertical projection value is as follows: one of the determined vertical projection values;
and calculating the average value of the selected vertical projection values, and determining the average value as a first threshold corresponding to the target vertical projection value.
Optionally, the step of determining the width of the sliding window includes:
and obtaining the height of the license plate image area, and determining the width of a sliding window according to the height.
Optionally, the types of the character segmentation points include a left segmentation point type and a right segmentation point type; the vertical projection value is obtained according to a binary license plate image area with white characters and black matrixes;
the step of determining character segmentation points according to the vertical projection values and the corresponding first threshold value comprises the following steps:
determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as character segmentation points of a left segmentation point type:
proj (i) < proj _ th (i) and proj (i +1) ≧ proj _ th (i +1)
Determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as character segmentation points of a right segmentation point type:
proj (i) ≧ proj _ th (i) and proj (i +1) < proj _ th (i +1)
Wherein, the proj (i) is an ith vertical projection value, and the proj _ th (i) is a first threshold corresponding to the ith vertical projection value.
Optionally, after the step of determining the character segmentation point according to each vertical projection value and the corresponding first threshold, the method further includes:
determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as candidate segmentation points of the license plate image region:
proj(i)-proj_th(i)<Th
the Th is a preset second threshold value;
determining the type of each candidate segmentation point according to the following modes:
calculating a distance value between a target candidate segmentation point and each character segmentation point, and determining the type of the character segmentation point corresponding to the minimum distance value as the type of the target candidate segmentation point, wherein the target candidate segmentation point is one of the determined candidate segmentation points;
the step of obtaining the alternative character region segmentation mode corresponding to the license plate image region according to the determined character segmentation points comprises the following steps:
and obtaining an alternative character region segmentation mode corresponding to the license plate image region according to the determined character segmentation points and the candidate segmentation points.
Optionally, after the step of determining the character segmentation point according to each vertical projection value and the corresponding first threshold, the method further includes:
obtaining a stable region of the license plate image region according to a most stable extremum region algorithm;
setting character segmentation points in each stable region as non-character segmentation points;
the step of obtaining the alternative character region segmentation mode corresponding to the license plate image region according to the determined character segmentation points comprises the following steps:
and obtaining an alternative character region segmentation mode corresponding to the license plate image region according to the rest character segmentation points.
Optionally, the step of obtaining a candidate character region segmentation manner corresponding to the license plate image region according to the determined character segmentation point includes:
obtaining a character area to be selected according to the determined character segmentation points;
determining a character region to be selected with a width in a range of [ w1, w2] as a target character region, wherein w1 is a preset first width threshold, w2 is a preset second width threshold, and w2 is not smaller than w 1;
and obtaining an alternative character region segmentation mode corresponding to the license plate image region according to the determined target character region.
In order to achieve the above object, the present application discloses a license plate recognition device, the device including:
the image area obtaining module is used for obtaining a license plate image area of a license plate number to be identified;
the segmentation point determination module is used for determining character segmentation points in the license plate image area;
the segmentation mode obtaining module is used for obtaining alternative character region segmentation modes corresponding to the license plate image region according to the determined character segmentation points;
the character recognition module is used for carrying out character recognition on the license plate image area according to each alternative character area segmentation mode to obtain a character recognition result;
and the license plate number obtaining module is used for obtaining the license plate number corresponding to the license plate image area according to the obtained character recognition result.
Optionally, the dividing point determining module includes:
the projection value determining submodule is used for determining the vertical projection value of each pixel column in the license plate image area according to a vertical projection method;
and the division point determining submodule is used for determining character division points according to the determined vertical projection value.
Optionally, the partitioning point determining sub-module includes:
a width determination unit for determining a width of the sliding window;
the threshold value calculation unit is used for calculating a first threshold value corresponding to each vertical projection value according to the width and each determined vertical projection value;
the segmentation point determining unit is used for determining character segmentation points according to each vertical projection value and the corresponding first threshold value;
the threshold calculation unit is specifically configured to:
calculating a first threshold corresponding to each vertical projection value according to the following mode:
according to the width, selecting a first continuous number of vertical projection values including a target vertical projection value according to the arrangement sequence of the vertical projection values, wherein the arrangement sequence of the vertical projection values is consistent with the arrangement sequence of pixel columns in the license plate image area, and the target vertical projection value is as follows: one of the determined vertical projection values;
and calculating the average value of the selected vertical projection values, and determining the average value as a first threshold corresponding to the target vertical projection value.
Optionally, the width determining unit is specifically configured to:
and obtaining the height of the license plate image area, and determining the width of a sliding window according to the height.
Optionally, the types of the character segmentation points include a left segmentation point type and a right segmentation point type; the vertical projection value is obtained according to a binary license plate image area with white characters and black matrixes;
the segmentation point determination unit is specifically configured to:
determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as character segmentation points of a left segmentation point type:
proj (i) < proj _ th (i) and proj (i +1) ≧ proj _ th (i +1)
Determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as character segmentation points of a right segmentation point type:
proj (i) ≧ proj _ th (i) and proj (i +1) < proj _ th (i +1)
Wherein, the proj (i) is an ith vertical projection value, and the proj _ th (i) is a first threshold corresponding to the ith vertical projection value.
Optionally, after the dividing point determining unit, the apparatus further includes a candidate point determining unit; the candidate point determination unit is configured to:
determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as candidate segmentation points of the license plate image region:
proj(i)-proj_th(i)<Th
the Th is a preset second threshold value;
determining the type of each candidate segmentation point according to the following modes:
calculating a distance value between a target candidate segmentation point and each character segmentation point, and determining the type of the character segmentation point corresponding to the minimum distance value as the type of the target candidate segmentation point, wherein the target candidate segmentation point is one of the determined candidate segmentation points;
the segmentation mode obtaining module is specifically configured to:
and obtaining an alternative character region segmentation mode corresponding to the license plate image region according to the determined character segmentation points and the candidate segmentation points.
Optionally, after the dividing point determining unit, the apparatus further includes:
the stable region obtaining unit is used for obtaining a stable region of the license plate image region according to a most stable extremum region algorithm;
the segmentation point setting unit is used for setting character segmentation points in each stable region as non-character segmentation points;
the segmentation mode obtaining module is specifically configured to:
and obtaining an alternative character region segmentation mode corresponding to the license plate image region according to the rest character segmentation points.
Optionally, the segmentation mode obtaining module includes:
the candidate region obtaining submodule is used for obtaining a candidate character region according to the determined character segmentation points;
a target region determining submodule, configured to determine a candidate character region with a width in a range of [ w1, w2] as a target character region, where w1 is a preset first width threshold, w2 is a preset second width threshold, and w2 is not less than w 1;
and the segmentation mode obtaining subunit is used for obtaining the alternative character region segmentation mode corresponding to the license plate image region according to the determined target character region.
According to the technical scheme, the method comprises the steps of firstly determining character segmentation points in a license plate image region of an obtained license plate number to be recognized, then obtaining alternative character region segmentation modes corresponding to the license plate image region according to the determined character segmentation points, carrying out character recognition on the license plate image region according to each alternative character region segmentation mode, obtaining character recognition results, and obtaining the license plate number corresponding to the license plate image region according to the obtained character recognition results.
That is to say, in the embodiment of the application, for the license plate image region of the license plate number to be recognized, each alternative character region segmentation mode corresponding to the license plate image region is obtained, character recognition is performed on the license plate image region according to each segmentation mode, character recognition is not required to be performed on the license plate image region according to a preset license plate template, that is, the license plate type corresponding to the license plate image region is not required to be distinguished. Therefore, the technical scheme of the embodiment of the application is applied to license plate recognition, and the compatibility of license plate recognition can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present application 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 obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a schematic flow chart of a license plate recognition method according to an embodiment of the present disclosure;
FIG. 2a is an exemplary diagram of a license plate image region and corresponding character segmentation points;
FIG. 2b is an exemplary diagram of a character segmentation result obtained according to an alternative character region segmentation method;
FIG. 3 is an exemplary view of a portion of a license plate;
fig. 4 is another schematic flow chart of a license plate recognition method according to an embodiment of the present disclosure;
FIG. 5 is a schematic flow chart of step S102B in FIG. 4;
FIG. 6a is an exemplary diagram of a vertical projection curve and a dynamic threshold curve corresponding to a license plate image region;
FIG. 6b is an exemplary diagram after obtaining character segmentation points for a license plate image region;
fig. 7 is a schematic structural diagram of a license plate recognition device according to an embodiment of the present disclosure;
fig. 8 is another schematic structural diagram of a license plate recognition device according to an embodiment of the present disclosure.
Detailed Description
The technical solution in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the described embodiments are merely a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a license plate recognition method and device, which are applied to electronic equipment, wherein the electronic equipment can be terminal equipment or a server and the like, and the terminal equipment can comprise a computer, a tablet personal computer, a smart phone, a vehicle data recorder and the like. By applying the technical scheme in the embodiment of the application to license plate recognition, the compatibility of license plate recognition can be improved.
The present application will be described in detail below with reference to specific examples.
Fig. 1 is a schematic flow chart of a license plate recognition method provided in an embodiment of the present application, and is applied to an electronic device. The method comprises the following steps:
step S101: and obtaining a license plate image area of the license plate number to be identified.
The license plate image area of the license plate number to be identified can be understood as follows: and a license plate image area needing license plate identification. The license plate image area is an image area containing a license plate in the license plate image. The license plate image is an image including a license plate portion of the vehicle. In a preferred embodiment, the license plate image area may be an image area formed by the outermost frame of the license plate characters. Of course, the license plate image region may also be a region containing other image portions than the license plate characters. In general, the license plate image area may be set to a rectangular area.
For example, the image region enclosed by the dashed line frame in fig. 2a is a license plate image region, and it can be seen from the figure that the dashed line frame includes a license plate "a 4170".
Specifically, the license plate image area of the license plate number to be recognized may be directly obtained, or may be obtained in the following manner: and obtaining a license plate image of the license plate number to be identified, and positioning the license plate of the license plate image to obtain a license plate image area. The license plate image of the license plate number to be identified can be understood as follows: and (4) a license plate image needing license plate identification.
The license plate image of the license plate number to be recognized can be an image including a vehicle captured on a road, an image including a vehicle captured in a parking lot, and the like. Of course, the license plate image of the license plate number to be recognized may also be obtained in other manners, and the obtaining manner of the license plate image of the license plate number to be recognized is not limited in the present application.
The electronic device as the execution subject may or may not include an image capturing device inside.
When the electronic device as the execution subject includes the image capturing device therein, the electronic device may include, when obtaining the license plate image of the license plate number to be recognized: and receiving a license plate image of the license plate number to be identified, which is acquired by the image acquisition equipment.
When the electronic device as the execution subject does not include an image capturing device inside, the electronic device may be connected to an external image capturing device, and the electronic device may include, when obtaining a license plate image of a license plate number to be recognized: and acquiring a license plate image of the license plate number to be identified, which is acquired by image acquisition equipment.
The acquired license plate image of the license plate number to be identified can be acquired by the image acquisition equipment in real time, or can be not acquired in real time, but is stored after being acquired in advance by the image acquisition equipment.
Step S102: and determining character segmentation points in the license plate image area.
In this embodiment, the character segmentation point may be determined by determining the coordinates of the character segmentation point. Specifically, the character segmentation point may be understood as a pixel point in a longitudinal pixel row in the license plate image region, and may also be understood as a lowermost pixel point in the longitudinal pixel row.
Specifically, for the license plate image region, the character segmentation points in the license plate image region can be determined by adopting methods such as vertical projection, connected domain, stroke width and the like. The present embodiment does not limit the specific method for determining the character segmentation point.
Step S103: and obtaining the alternative character region segmentation mode corresponding to the license plate image region according to the determined character segmentation points.
Wherein "alternative" also means "possible". The character region segmentation mode is a combination mode of character segmentation points of the whole license plate image region. It will be appreciated that two different character segmentation points may define a character region, the two character segmentation points forming a character segmentation point group. Each character region division mode comprises at least one character division point group.
Generally, at least one character region segmentation mode corresponding to the license plate image region can be obtained according to the determined character segmentation points. And a character region segmentation mode is obtained, so that the license plate image region can be subjected to character segmentation according to the segmentation mode, and a corresponding character segmentation result is obtained.
Typically, a license plate contains a certain number of "spaces", i.e., there are blank areas between characters, and there are no characters in these blank areas. Therefore, when the character area segmentation mode is determined, the character segmentation point group with the formed character area as a blank area can be set as a non-character segmentation point group, so that interference factors can be removed as much as possible, and the character recognition efficiency is improved.
Specifically, the character areas determined by the character segmentation point groups may be determined to be blank areas according to methods such as vertical projection, connected component, stroke width, and the like.
For example, in fig. 2a, 10 character division points in the license plate image area are marked by triangle symbols, and numbers of the character division points are marked in the middle of the triangle symbols, and the numbers are 1, 2, …, and 10, respectively. From these 10 character division points, two character region division methods can be obtained, the first being (1, 2) (3, 4) (5, 6) (7, 8) (9, 10), and the second being (1, 2) (3, 6) (7, 8) (9, 10). Wherein, the combination (1, 2) is a character segmentation point group. And according to the methods of vertical projection, connected domain, stroke width and the like, corresponding character regions between (2, 3), (4, 5), (6, 7), (8, 9) in the license plate image region can be determined as blank regions, so that the combinations are discarded.
As a specific embodiment, in order to more accurately segment a license plate image region, obtaining a candidate character region segmentation manner corresponding to the license plate image region according to the determined character segmentation points may include steps 1 to 3:
step 1: and obtaining a character area to be selected according to the determined character segmentation points.
The candidate character area may be an area represented by coordinates of two character segmentation points.
Step 2: determining a character region to be selected with a width within a range of [ w1, w2] as a target character region, wherein w1 is a preset first width threshold, w2 is a preset second width threshold, and w2 is not smaller than w 1. In general, the values of w1 and w2 can be obtained empirically.
It will be appreciated that candidate character regions having widths in the range of [ w1, w2] are more likely to be real character regions. Candidate character regions with widths greater than w2 or less than w1 may be too wide or too narrow, and are less likely to belong to real character regions, and are therefore discarded to improve the accuracy of segmentation.
And step 3: and obtaining an alternative character region segmentation mode corresponding to the license plate image region according to the determined target character region.
Step S104: and aiming at each alternative character region segmentation mode, performing character recognition on the license plate image region to obtain a character recognition result.
As a specific implementation manner, when performing character recognition on the license plate image region, the license plate image region may be segmented according to the alternative character region segmentation modes to obtain a character region segmentation result corresponding to each alternative character region segmentation mode, and then the character image in each character region segmentation result is subjected to character recognition to obtain a character recognition result.
Specifically, when performing character recognition on a character image in each character region segmentation result, the feature value of each character image may be input to the character recognizer, and the character recognizer outputs a character and a confidence corresponding to each character image, that is, each character recognition result may include a character and a confidence.
Following the example in step S103, for two alternative character region segmentation methods, the license plate image region may be segmented to obtain two character region segmentation results shown in fig. 2b, and the character image in each character region segmentation result is input into the character classifier, so as to obtain two character recognition results shown in table 1.
TABLE 1
Figure BDA0001161210690000111
When character recognition is performed on a character image, the character recognition can be performed in a manner of a Hog (histogram of oriented gradients) + SVM (support vector machine) classifier. Specifically, a Hog feature value of each character image may be extracted, the feature value may be input to an SVM classifier, and the classifier outputs a recognition result.
The SVM classifier comprises 37 output units, namely 10 numbers, 26 English letters and an unknown character. The confidence value range is [0, 1000 ].
It should be noted that other character recognizers can be used for character recognition in the embodiment of the present application, and the character recognition manner is not specifically limited in the embodiment of the present application.
Step S105: and acquiring a license plate number corresponding to the license plate image area according to the acquired character recognition result.
As a specific implementation manner, when obtaining the license plate number corresponding to the license plate image region according to the obtained character recognition result, the confidence and the value of each character recognition result may be calculated first, and the character recognition result corresponding to the maximum value of the confidence and the value may be determined as the license plate number corresponding to the license plate image region.
Following the example in step S104, for two character recognition results in table 1, the confidence and the value of each character recognition result can be obtained, which are: the confidence sum value of the first character recognition result is 904+935+956+923+960, 4678, and the confidence sum value of the second character recognition result is: 904+300+923+960 3087. As can be seen, the confidence and the value of the first character recognition result are relatively large, so that the first character recognition result is determined as the license plate number corresponding to the license plate image region.
It should be noted that if the recognition result of the classifier is determined to be "unknown" this character, it means that the character cannot be recognized from the character region. The reason why the recognition result of the classifier is determined to be "unknown" is generally because the confidence of the "unknown" output unit is higher among the output units included in the classifier. This presents a problem. When the character recognition result is obtained, the higher the confidence of each character in the character recognition result is, the higher the corresponding confidence sum value is. However, when the character recognition result includes the character which is "unknown", the confidence coefficient and the value of the character recognition result should be low, and the confidence coefficient of the character which is "unknown" is high, which causes the confidence coefficient and the value of the character recognition result to be correspondingly high, so that the character recognition result is not in line with the fact.
For example, in the character recognition of the second segmentation result shown in fig. 2b, each character and the corresponding confidence in the recognition result are: a-904, "unknown" -700, 7-923; 0 to 960. As can be seen, there is "unknown" in the recognition result. Accordingly, the confidence and value of the recognition result should be lower than if the second character could recognize a non "unknown" character. However, if the confidences of the above results are directly summed, the resulting confidence sum is very high.
In order to ensure that the confidence coefficient and the value are obtained, the confidence coefficient of each character in the recognition result can be accumulated, when the unknown character exists in the recognition result, the confidence coefficient is subtracted from the maximum confidence coefficient value to obtain the modified confidence coefficient of the unknown character, and the modified confidence coefficient is adopted to solve the problems.
For example, if the confidence of the "unknown" character is 700 and the extreme confidence range is [0, 1000], the maximum confidence value of 1000-.
As can be seen from the above, in this embodiment, for an obtained license plate image region of a license plate number to be recognized, character segmentation points in the license plate image region are determined, then alternative character region segmentation modes corresponding to the license plate image region are obtained according to the determined character segmentation points, character recognition is performed on the license plate image region according to each alternative character region segmentation mode, a character recognition result is obtained, and a license plate number corresponding to the license plate image region is obtained according to the obtained character recognition result.
That is to say, in this embodiment, for a license plate image region of a license plate number to be recognized, each alternative character region segmentation mode corresponding to the license plate image region is obtained, character recognition is performed on the license plate image region according to each segmentation mode, character recognition is not required to be performed on the license plate image region according to a preset license plate template, that is, a license plate type corresponding to the license plate image region is not required to be distinguished. Therefore, the technical scheme of the embodiment is applied to license plate recognition, and the compatibility of license plate recognition can be improved.
For example, in the existing license plate recognition method, a license plate template can be established according to the type of a Chinese license plate so as to recognize the license plate in a Chinese area. However, for the license plates in other countries such as fig. 3, the license plate templates in the china cannot be used for license plate recognition. As can also be seen from fig. 3, there are no fixed templates between the license plates, and there are many variations, and with the license plate recognition method in this embodiment, there is no need to match license plate templates, and there is no need to distinguish what license plate types the license plates belong to, but the character segmentation points are found according to the license plate image regions, possible character region segmentation modes corresponding to the license plate image regions are obtained, possible character recognition results of the license plate image regions are obtained according to the modes, and the license plate number is determined from the possible character recognition results. Therefore, the license plate recognition method provided by the embodiment is high in compatibility.
Fig. 4 is another schematic flow chart of the license plate recognition method according to the embodiment of the present application, where the method is applied to an electronic device. This method embodiment is an improvement over the method embodiment shown in fig. 1. The unmodified part is the same as the embodiment shown in fig. 1, and the embodiment does not discuss the unmodified part in detail, and the related description can refer to the embodiment shown in fig. 1.
In the embodiment shown in fig. 1, in step S102, the step of determining the character segmentation points in the license plate image region may include:
step S102A: and determining the vertical projection value of each pixel column in the license plate image area according to a vertical projection method.
When the vertical projection value of each pixel column in the license plate image area is determined, it can be understood that: and summing the pixel values of each pixel column in the license plate image area, and taking the sum value as a vertical projection value corresponding to the pixel column. A pixel column refers to a column of pixels in the vertical direction in the image.
Specifically, in order to reduce the processing complexity, when the vertical projection value of each pixel column in the license plate image region is determined, the license plate image region may be first converted into a gray image, then the gray image is binarized to obtain a binarized image, and the vertical projection value of each pixel column in the binarized image is determined.
The grayscale image may be binarized by using an amplitude transformation unit (OSTU) algorithm. The obtained binary image may be an image with a black character and a white background, or an image with a white character and a black background.
Step S102B: and determining character segmentation points according to the determined vertical projection values.
Specifically, the step S102B may include various embodiments, and the determined vertical projection values may be respectively compared with a preset threshold, and a pixel point in the license plate image region corresponding to the vertical projection value greater than the preset threshold is determined as a character segmentation point. In this embodiment, the predetermined threshold is a predetermined fixed value, which may be empirically determined. This method may be referred to as a fixed threshold method.
It is also possible to compare the determined vertical projection values with a dynamically changing threshold value. The dynamically changing threshold may be determined based on the license plate image region. That is, each of the vertical projection values is compared to a corresponding threshold value, which is different for each of the vertical projection values. The dynamically varying threshold may be determined from the vertical projection values. This method may be referred to as a dynamic thresholding method.
Therefore, in the embodiment, according to the vertical projection method, the character segmentation points of the license plate image area are determined by using the characteristic that the pixel values of the pixels of the character part and the background part in the license plate image area are obviously different, so that the accuracy of the determined character segmentation points can be improved, and the accuracy of the character recognition process is improved.
In a specific implementation manner based on the embodiment shown in fig. 4, in order to determine the character segmentation point more accurately according to the vertical projection value, in step S102B, the step of determining the character segmentation point according to the determined vertical projection value may be performed according to a flowchart shown in fig. 5, where the flowchart specifically includes the following steps:
step S102B 1: the width of the sliding window is determined.
In the present embodiment, when the width of the license plate image area in the horizontal direction is measured by the number of pixels, the width of the sliding window is also expressed by the number of pixels. When the longitudinal width of the license plate image area is measured as a normalized value, the width of the sliding window is also expressed as a normalized value. In summary, the width of the sliding window is used to represent the magnitude value. The width may be a preset value or a value determined according to the license plate image area.
In one embodiment, the step of determining the width of the sliding window may include: and obtaining the height of the license plate image area, and determining the width of a sliding window according to the height.
Further, the product of the preset value and the height of the license plate image area can be used as the width of the sliding window. Wherein the preset value may take a value such as 0.6. For example, the license plate image area is an image with a width of 100 pixels by 20 pixels, and the width of the sliding window may be: 0.6 × 20 pixels to 12 pixels.
The sum of the preset value and the height of the license plate image area can also be used as the width of the sliding window. Of course, other embodiments may also be included in determining the width of the sliding window.
It should be noted that, because there is a certain correlation between the longitudinal width and the lateral height of the license plate image region, the width of the sliding window is determined according to the height of the license plate image region, and the accuracy can be improved.
Step S102B 2: and calculating a first threshold corresponding to each vertical projection value according to the width and the determined vertical projection values.
For step S102B2, the first threshold corresponding to each vertical projection value may be calculated as shown in steps 1 and 2 below:
step 1: and selecting a first number of consecutive vertical projection values including the target vertical projection value according to the width and the arrangement sequence of the vertical projection values.
Wherein, the arrangement sequence of the vertical projection values is consistent with the arrangement sequence of the pixel columns in the license plate image area, and the target vertical projection values are as follows: one of the determined vertical projection values.
Step 2: and calculating the average value of the selected vertical projection values, and determining the average value as a first threshold corresponding to the target vertical projection value.
Step S102B 3: and determining character segmentation points according to the vertical projection values and the corresponding first threshold values.
It should be noted that, in general, the character segmentation points can be divided into a left segmentation point type and a right segmentation point type according to their types, and the two types are respectively used for representing the left and right segmentation points of the character region.
As mentioned above, the license plate image region may be converted into a binary image, and the vertical projection value of each pixel column is obtained according to the binary image, wherein the binary image may be black-and-white-based, or white-and-black-based. That is, the vertical projection value may be obtained from a binarized image of a black-and-white background, or may be a binarized image of a white-and-black background. One embodiment of step S102B3 will be described below in the case where the vertical projection value is obtained from the binarized image of white-black matrix.
As a specific embodiment, in the case that the vertical projection values are obtained from the binarized license plate image area with white and black matrixes, the step S102B3 of determining the character segmentation points according to each vertical projection value and the corresponding first threshold value may include the following steps 1 and 2:
step 1: determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as character segmentation points of a left segmentation point type:
proj (i) < proj _ th (i) and proj (i +1) ≧ proj _ th (i +1)
Step 2: determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as character segmentation points of a right segmentation point type:
proj (i) ≧ proj _ th (i) and proj (i +1) < proj _ th (i +1)
Wherein, the proj (i) is an ith vertical projection value, and the proj _ th (i) is a first threshold corresponding to the ith vertical projection value.
It can be understood that for the character segmentation point of the left segmentation point type, the corresponding vertical projection value is smaller than the corresponding first threshold value, and the corresponding vertical projection value of the next character segmentation point is not smaller than the corresponding first threshold value. And aiming at the character segmentation point of the right segmentation point type, the corresponding vertical projection value is not less than the corresponding first threshold value, and the vertical projection value corresponding to the next character segmentation point is less than the corresponding first threshold value.
As a specific embodiment, a vertical projection curve corresponding to the license plate image region can be obtained by taking the coordinates of each horizontal pixel point in the license plate image region as a horizontal axis and taking each vertical projection value corresponding to each pixel column as a vertical axis. And taking the coordinates of each transverse pixel point in the license plate image area as a horizontal axis, and taking the first threshold corresponding to each vertical projection value as a vertical axis, so as to obtain a dynamic threshold curve corresponding to the license plate image area. The vertical projection curve comprises a peak and a trough, the fluctuation is large, the dynamic threshold curve is relatively smooth, and the fluctuation is small.
Comparing the points in the vertical projection curve and the dynamic threshold curve, it can be found that, among the points where the two curves intersect, the point in the rising period of the vertical projection curve is the character segmentation point of the left segmentation point type (referred to as the left segmentation point for short), and the point in the falling period of the vertical projection curve is the character segmentation point of the right segmentation point type (referred to as the right segmentation point for short).
For example, in fig. 6a, a corresponding vertical projection curve 1 and a corresponding dynamic threshold value curve 2 are drawn above a binarized license plate image area with white characters and black matrixes, and it can be seen that the vertical projection curve includes many peaks and troughs, and the dynamic threshold value curve has a small number of peaks and troughs, and is relatively smooth and has small fluctuation. Comparing the two curves yields a number of left and right segmentation points. In fig. 6a, a triangle symbol with "l" represents the left division point, and a triangle symbol with "r" represents the right division point.
The above description is a specific embodiment included in step S102B3, in the case where the vertical projection value is obtained from the binarized license plate image area with white and black matrixes. Based on the same idea, in the case that the vertical projection value is obtained according to the binarized license plate image region with black and white background, the following specific implementation manner included in step S102B3 can be obtained, and the following steps 1 and 2 are specifically included:
step 1: determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as character segmentation points of a left segmentation point type:
proj (i) ≧ proj _ th (i) and proj (i +1) < proj _ th (i +1)
Step 2: determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as character segmentation points of a right segmentation point type:
proj (i) < proj _ th (i) and proj (i +1) ≧ proj _ th (i +1)
Wherein, the proj (i) is an ith vertical projection value, and the proj _ th (i) is a first threshold corresponding to the ith vertical projection value.
For a detailed description of this embodiment, reference may be made to the embodiment of the "white-black matrix" case described above.
In summary, in this embodiment, the character segmentation points are determined by using a dynamic threshold method, and the dynamic first threshold is determined according to the vertical projection value, so that the change rule of the vertical projection value can be more accurately reflected, and the character segmentation points can be more accurately determined.
The number of character segmentation points determined through the above process may be large, and many non-character segmentation points are included in the character segmentation points. As shown in fig. 6a, there may be two left segmentation points and two right segmentation points for one character. In order to improve the accuracy of character segmentation and reduce the number of segmentation points, the present embodiment may further include the following embodiments.
As a specific implementation manner, after step S102B3, that is, after the step of determining the character segmentation point according to each vertical projection value and the corresponding first threshold, the method may further include: and obtaining stable regions of the license plate image region according to a most stable extremum region algorithm, and setting character segmentation points in each stable region as non-character segmentation points. The character segmentation points in each stable region do not include the character segmentation points on the two side edges of each stable region.
The most Stable extremum region algorithm (MSER) is an image segmentation algorithm for obtaining the most Stable extremum region. When the stable region of the license plate image region is obtained according to the most stable extremal region algorithm, the license plate image region can be used as the input of the most stable extremal region algorithm, and each stable region corresponding to the license plate image region is output.
That is, the character segmentation points inside the stable region are set as non-character segmentation points, i.e., the character segmentation points inside the stable region are deleted from the determined character segmentation points.
It will be appreciated that the stable region is considered to be a complete character region, should not be segmented, and the character segmentation points within it are considered to be possibly inaccurate.
Correspondingly, in step S103, the step of obtaining the alternative character region segmentation mode corresponding to the license plate image region according to the determined character segmentation point may include:
and obtaining an alternative character region segmentation mode corresponding to the license plate image region according to the rest character segmentation points.
In summary, in the embodiment, some inaccurate character segmentation points are removed according to the stable region, so that the accuracy can be improved, the number of segmentation points can be reduced, and the processing complexity can be reduced.
Generally, according to the comparison between the vertical projection value and the first threshold value, the character segmentation points of the left segmentation point type and the character segmentation points of the right segmentation point type in the license plate image area can be determined, but there may be character segmentation points which are not identified.
For example, the character segmentation points determined for the license plate image area are listed in fig. 6b, and it can be seen that the character segmentation points in the middle of the "41" part are not effectively determined.
Furthermore, in order to identify the missing character segmentation points and improve the license plate identification accuracy, after step S102B3, that is, after determining the character segmentation points of the left segmentation point type and the right segmentation point type according to each vertical projection value and the corresponding first threshold value, the method may further include:
determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as candidate segmentation points of the license plate image region:
proj(i)-proj_th(i)<Th
the Th is a preset second threshold, that is, the second threshold is a preset fixed value and is different from the dynamically changing first threshold.
Determining the type of each candidate segmentation point according to the following modes:
calculating distance values between a target candidate segmentation point and each character segmentation point, and determining the type of the character segmentation point corresponding to the minimum distance value as the type of the target candidate segmentation point, wherein the target candidate segmentation point is one of the determined candidate segmentation points.
Correspondingly, step S103, obtaining a candidate character region segmentation mode corresponding to the license plate image region according to the determined character segmentation point, includes:
and obtaining an alternative character region segmentation mode corresponding to the license plate image region according to the determined character segmentation points and the candidate segmentation points.
In the embodiment, the candidate segmentation points in the license plate image region are determined by adopting a fixed threshold method, and the character segmentation points missing in the license plate image region can be identified and processed, so that the accuracy of the character segmentation process is improved.
Of course, after the candidate segmentation points, the candidate segmentation points in each stable region can be set as non-candidate segmentation points according to the obtained stable region of the license plate image region, so that the accuracy of character segmentation is improved, and the number of segmentation points is reduced, so that the processing complexity is reduced.
Fig. 7 is a schematic structural diagram of a license plate recognition device according to an embodiment of the present disclosure, where the license plate recognition device is applied to an electronic device, and the embodiment corresponds to the embodiment of the method shown in fig. 1. Specifically, the device includes:
the image area obtaining module 701 is used for obtaining a license plate image area of a license plate number to be identified;
a segmentation point determination module 702, configured to determine character segmentation points in the license plate image region;
a segmentation mode obtaining module 703, configured to obtain, according to the determined character segmentation point, an alternative character region segmentation mode corresponding to the license plate image region;
the character recognition module 704 is used for carrying out character recognition on the license plate image area according to each alternative character area segmentation mode to obtain a character recognition result;
and a license plate number obtaining module 705, configured to obtain a license plate number corresponding to the license plate image area according to the obtained character recognition result.
In an implementation manner based on the embodiment shown in fig. 7, the segmentation mode obtaining module 703 may specifically include:
a candidate region obtaining submodule (not shown in the figure) for obtaining a candidate character region according to the determined character segmentation point;
a target region determining submodule (not shown in the figure) for determining a candidate character region with a width in a range of [ w1, w2] as a target character region, wherein w1 is a preset first width threshold, w2 is a preset second width threshold, and w2 is not smaller than w 1;
and a segmentation mode obtaining subunit (not shown in the figure) configured to obtain, according to the determined target character region, a candidate character region segmentation mode corresponding to the license plate image region.
Fig. 8 is another schematic structural diagram of a license plate recognition device provided in an embodiment of the present application, where the embodiment of the license plate recognition device is a modified solution based on the embodiment shown in fig. 7, and the unmodified portions are the same as the embodiment shown in fig. 7, and specific contents may refer to the embodiment shown in fig. 7. This embodiment corresponds to the method embodiment shown in fig. 4.
The segmentation point determining module 702 specifically includes:
the projection value determining submodule 702A is configured to determine, according to a vertical projection method, a vertical projection value of each pixel column in the license plate image region;
and the division point determining submodule 702B is configured to determine character division points according to the determined vertical projection values.
Based on an implementation manner of the embodiment shown in fig. 8, the partitioning point determining sub-module 702B may specifically include:
a width determining unit (not shown in the drawings) for determining a width of the sliding window;
a threshold calculation unit (not shown in the figure) for calculating a first threshold corresponding to each vertical projection value according to the width and the determined vertical projection values;
a division point determining unit (not shown in the figure) for determining character division points according to each vertical projection value and the corresponding first threshold;
the threshold calculation unit is specifically configured to:
calculating a first threshold corresponding to each vertical projection value according to the following mode:
according to the width, selecting a first continuous number of vertical projection values including a target vertical projection value according to the arrangement sequence of the vertical projection values, wherein the arrangement sequence of the vertical projection values is consistent with the arrangement sequence of pixel columns in the license plate image area, and the target vertical projection value is as follows: one of the determined vertical projection values;
and calculating the average value of the selected vertical projection values, and determining the average value as a first threshold corresponding to the target vertical projection value.
In an implementation manner based on the embodiment shown in fig. 8, the width determining unit is specifically configured to:
and obtaining the height of the license plate image area, and determining the width of a sliding window according to the height.
In one implementation based on the embodiment shown in fig. 8, the types of the character segmentation points include a left segmentation point type and a right segmentation point type; the vertical projection value is obtained according to a binary license plate image area with white characters and black matrixes;
the segmentation point determination unit is specifically configured to:
determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as character segmentation points of a left segmentation point type:
proj (i) < proj _ th (i) and proj (i +1) ≧ proj _ th (i +1)
Determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as character segmentation points of a right segmentation point type:
proj (i) ≧ proj _ th (i) and proj (i +1) < proj _ th (i +1)
Wherein, the proj (i) is an ith vertical projection value, and the proj _ th (i) is a first threshold corresponding to the ith vertical projection value.
In an implementation manner based on the embodiment shown in fig. 8, after the dividing point determining unit, the apparatus may further include a candidate point determining unit (not shown in the figure); the candidate point determination unit is configured to:
determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as candidate segmentation points of the license plate image region:
proj(i)-proj_th(i)<Th
the Th is a preset second threshold value;
determining the type of each candidate segmentation point according to the following modes:
calculating a distance value between a target candidate segmentation point and each character segmentation point, and determining the type of the character segmentation point corresponding to the minimum distance value as the type of the target candidate segmentation point, wherein the target candidate segmentation point is one of the determined candidate segmentation points;
the segmentation mode obtaining module 703 may be specifically configured to:
and obtaining an alternative character region segmentation mode corresponding to the license plate image region according to the determined character segmentation points and the candidate segmentation points.
In an implementation manner based on the embodiment shown in fig. 8, after the dividing point determining unit, the apparatus may further include:
a stable region obtaining unit (not shown in the figure) for obtaining a stable region of the license plate image region according to a most stable extremum region algorithm;
a division point setting unit (not shown in the figure) for setting character division points inside each stable region as non-character division points;
the segmentation mode obtaining module 703 may be specifically configured to: and obtaining an alternative character region segmentation mode corresponding to the license plate image region according to the rest character segmentation points.
Since the device embodiment is obtained based on the method embodiment and has the same technical effect as the method, the technical effect of the device embodiment is not described herein again. For the apparatus embodiment, since it is substantially similar to the method embodiment, it is described relatively simply, and reference may be made to some descriptions of the method embodiment for relevant points.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
It will be understood by those skilled in the art that all or part of the steps in the above embodiments can be implemented by hardware associated with program instructions, and the program can be stored in a computer readable storage medium. The storage medium referred to herein is a ROM/RAM, a magnetic disk, an optical disk, or the like.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (14)

1. A license plate recognition method is characterized by comprising the following steps:
obtaining a license plate image area of a license plate number to be identified;
determining character segmentation points in the license plate image area;
according to the determined character segmentation points, obtaining alternative character region segmentation modes corresponding to the license plate image region;
for each alternative character region segmentation mode, performing character recognition on the license plate image region to obtain a character recognition result;
acquiring a license plate number corresponding to the license plate image area according to the acquired character recognition result;
the method further comprises the following steps:
obtaining a stable region of the license plate image region according to a most stable extremum region algorithm
Setting character segmentation points in each stable region as non-character segmentation points;
the step of obtaining the alternative character region segmentation mode corresponding to the license plate image region according to the determined character segmentation points comprises the following steps:
and obtaining an alternative character region segmentation mode corresponding to the license plate image region according to the rest character segmentation points.
2. The method of claim 1, wherein the step of determining character segmentation points in the license plate image region comprises:
determining a vertical projection value of each pixel column in the license plate image area according to a vertical projection method;
and determining character segmentation points according to the determined vertical projection values.
3. The method of claim 2, wherein the step of determining character segmentation points based on the determined vertical projection values comprises:
determining the width of a sliding window;
calculating a first threshold corresponding to each vertical projection value according to the width and each determined vertical projection value;
determining character segmentation points according to each vertical projection value and the corresponding first threshold value;
wherein the step of calculating a first threshold corresponding to each vertical projection value according to the width and the determined vertical projection values comprises:
calculating a first threshold corresponding to each vertical projection value according to the following mode:
according to the width, selecting a first continuous number of vertical projection values including a target vertical projection value according to the arrangement sequence of the vertical projection values, wherein the arrangement sequence of the vertical projection values is consistent with the arrangement sequence of pixel columns in the license plate image area, and the target vertical projection value is as follows: one of the determined vertical projection values;
and calculating the average value of the selected vertical projection values, and determining the average value as a first threshold corresponding to the target vertical projection value.
4. The method of claim 3, wherein the step of determining the width of the sliding window comprises:
and obtaining the height of the license plate image area, and determining the width of a sliding window according to the height.
5. The method of claim 3, wherein the types of character segmentation points include a left segmentation point type and a right segmentation point type; the vertical projection value is obtained according to a binary license plate image area with white characters and black matrixes;
the step of determining character segmentation points according to the vertical projection values and the corresponding first threshold value comprises the following steps:
determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as character segmentation points of a left segmentation point type:
proj (i) < proj _ th (i) and proj (i +1) ≧ proj _ th (i +1)
Determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as character segmentation points of a right segmentation point type:
proj (i) ≧ proj _ th (i) and proj (i +1) < proj _ th (i +1)
Wherein, the proj (i) is an ith vertical projection value, and the proj _ th (i) is a first threshold corresponding to the ith vertical projection value.
6. The method of claim 5, wherein after the step of determining character segmentation points based on the respective vertical projection values and the corresponding first threshold, the method further comprises:
determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as candidate segmentation points of the license plate image region:
proj(i)-proj_th(i)<Th
the Th is a preset second threshold value;
determining the type of each candidate segmentation point according to the following modes:
calculating a distance value between a target candidate segmentation point and each character segmentation point, and determining the type of the character segmentation point corresponding to the minimum distance value as the type of the target candidate segmentation point, wherein the target candidate segmentation point is one of the determined candidate segmentation points;
the step of obtaining the alternative character region segmentation mode corresponding to the license plate image region according to the determined character segmentation points comprises the following steps:
and obtaining an alternative character region segmentation mode corresponding to the license plate image region according to the determined character segmentation points and the candidate segmentation points.
7. The method according to claim 1, wherein the step of obtaining the candidate character region segmentation mode corresponding to the license plate image region according to the determined character segmentation point comprises:
obtaining a character area to be selected according to the determined character segmentation points;
determining a character region to be selected with a width in a range of [ w1, w2] as a target character region, wherein w1 is a preset first width threshold, w2 is a preset second width threshold, and w2 is not smaller than w 1;
and obtaining an alternative character region segmentation mode corresponding to the license plate image region according to the determined target character region.
8. A license plate recognition device, the device comprising:
the image area obtaining module is used for obtaining a license plate image area of a license plate number to be identified;
the segmentation point determination module is used for determining character segmentation points in the license plate image area;
the segmentation mode obtaining module is used for obtaining alternative character region segmentation modes corresponding to the license plate image region according to the determined character segmentation points;
the character recognition module is used for carrying out character recognition on the license plate image area according to each alternative character area segmentation mode to obtain a character recognition result;
the license plate number obtaining module is used for obtaining a license plate number corresponding to the license plate image area according to the obtained character recognition result;
the device further comprises:
the stable region obtaining unit is used for obtaining a stable region of the license plate image region according to a most stable extremum region algorithm;
the segmentation point setting unit is used for setting character segmentation points in each stable region as non-character segmentation points;
the segmentation mode obtaining module is specifically configured to:
and obtaining an alternative character region segmentation mode corresponding to the license plate image region according to the rest character segmentation points.
9. The apparatus of claim 8, wherein the segmentation point determination module comprises:
the projection value determining submodule is used for determining the vertical projection value of each pixel column in the license plate image area according to a vertical projection method;
and the division point determining submodule is used for determining character division points according to the determined vertical projection value.
10. The apparatus of claim 9, wherein the partitioning point determining sub-module comprises:
a width determination unit for determining a width of the sliding window;
the threshold value calculation unit is used for calculating a first threshold value corresponding to each vertical projection value according to the width and each determined vertical projection value;
the segmentation point determining unit is used for determining character segmentation points according to each vertical projection value and the corresponding first threshold value;
the threshold calculation unit is specifically configured to:
calculating a first threshold corresponding to each vertical projection value according to the following mode:
according to the width, selecting a first continuous number of vertical projection values including a target vertical projection value according to the arrangement sequence of the vertical projection values, wherein the arrangement sequence of the vertical projection values is consistent with the arrangement sequence of pixel columns in the license plate image area, and the target vertical projection value is as follows: one of the determined vertical projection values;
and calculating the average value of the selected vertical projection values, and determining the average value as a first threshold corresponding to the target vertical projection value.
11. The apparatus according to claim 10, wherein the width determining unit is specifically configured to:
and obtaining the height of the license plate image area, and determining the width of a sliding window according to the height.
12. The apparatus of claim 10, wherein the types of character segmentation points include a left segmentation point type and a right segmentation point type; the vertical projection value is obtained according to a binary license plate image area with white characters and black matrixes;
the segmentation point determination unit is specifically configured to:
determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as character segmentation points of a left segmentation point type:
proj (i) < proj _ th (i) and proj (i +1) ≧ proj _ th (i +1)
Determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as character segmentation points of a right segmentation point type:
proj (i) ≧ proj _ th (i) and proj (i +1) < proj _ th (i +1)
Wherein, the proj (i) is an ith vertical projection value, and the proj _ th (i) is a first threshold corresponding to the ith vertical projection value.
13. The apparatus according to claim 12, characterized in that after the division point determining unit, the apparatus further comprises a candidate point determining unit; the candidate point determination unit is configured to:
determining pixel points in the license plate image region corresponding to the vertical projection values meeting the following conditions as candidate segmentation points of the license plate image region:
proj(i)-proj_th(i)<Th
the Th is a preset second threshold value;
determining the type of each candidate segmentation point according to the following modes:
calculating a distance value between a target candidate segmentation point and each character segmentation point, and determining the type of the character segmentation point corresponding to the minimum distance value as the type of the target candidate segmentation point, wherein the target candidate segmentation point is one of the determined candidate segmentation points;
the segmentation mode obtaining module is specifically configured to:
and obtaining an alternative character region segmentation mode corresponding to the license plate image region according to the determined character segmentation points and the candidate segmentation points.
14. The apparatus of claim 8, wherein the segmentation approach obtaining module comprises:
the candidate region obtaining submodule is used for obtaining a candidate character region according to the determined character segmentation points;
a target region determining submodule, configured to determine a candidate character region with a width in a range of [ w1, w2] as a target character region, where w1 is a preset first width threshold, w2 is a preset second width threshold, and w2 is not less than w 1;
and the segmentation mode obtaining subunit is used for obtaining the alternative character region segmentation mode corresponding to the license plate image region according to the determined target character region.
CN201611052182.2A 2016-11-24 2016-11-24 License plate recognition method and device Active CN108108734B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611052182.2A CN108108734B (en) 2016-11-24 2016-11-24 License plate recognition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611052182.2A CN108108734B (en) 2016-11-24 2016-11-24 License plate recognition method and device

Publications (2)

Publication Number Publication Date
CN108108734A CN108108734A (en) 2018-06-01
CN108108734B true CN108108734B (en) 2021-09-24

Family

ID=62204484

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611052182.2A Active CN108108734B (en) 2016-11-24 2016-11-24 License plate recognition method and device

Country Status (1)

Country Link
CN (1) CN108108734B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109034145B (en) * 2018-07-06 2021-11-09 西安电子科技大学 Bank card number identification method based on OpenCV
CN108960244B (en) * 2018-07-10 2023-06-20 北京智芯原动科技有限公司 Character projection segmentation method and device for license plate
CN110728276B (en) * 2018-07-16 2022-12-06 杭州海康威视数字技术股份有限公司 License plate recognition method and device
CN109063702B (en) * 2018-08-08 2022-05-17 北京旷视科技有限公司 License plate recognition method, device, equipment and storage medium
CN109977959B (en) * 2019-03-29 2021-07-06 国家电网有限公司 Train ticket character area segmentation method and device
CN110728687B (en) * 2019-10-15 2022-08-02 卓尔智联(武汉)研究院有限公司 File image segmentation method and device, computer equipment and storage medium
CN111696364A (en) * 2020-06-22 2020-09-22 沈志强 Roadside parking management method
CN112232354A (en) * 2020-11-23 2021-01-15 中国第一汽车股份有限公司 Character recognition method, device, equipment and storage medium
WO2022141073A1 (en) * 2020-12-29 2022-07-07 深圳市锐明技术股份有限公司 License plate recognition method and apparatus, and electronic device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6037082A (en) * 1983-08-05 1985-02-26 Ricoh Co Ltd Character cutting system
JPS61206088A (en) * 1985-03-11 1986-09-12 Mitsubishi Electric Corp Character reading device
CN101770576A (en) * 2008-12-31 2010-07-07 北京新岸线网络技术有限公司 Method and device for extracting characters
CN101877050A (en) * 2009-11-10 2010-11-03 青岛海信网络科技股份有限公司 Automatic extracting method for characters on license plate
CN102129560A (en) * 2010-01-18 2011-07-20 富士通株式会社 Method and device for identifying characters
CN102254157A (en) * 2011-07-07 2011-11-23 北京文通图像识别技术研究中心有限公司 Evaluating method for searching character segmenting position between two adjacent characters
CN102402686A (en) * 2011-12-07 2012-04-04 北京云星宇交通工程有限公司 Method for dividing license plate characters based on connected domain analysis
CN102693431A (en) * 2012-05-31 2012-09-26 信帧电子技术(北京)有限公司 Method and device for identifying type of white number plate
CN103207998A (en) * 2012-12-24 2013-07-17 电子科技大学 License plate character segmentation method based on support vector machine
CN103530600A (en) * 2013-06-06 2014-01-22 东软集团股份有限公司 License plate recognition method and system under complicated illumination

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6037082A (en) * 1983-08-05 1985-02-26 Ricoh Co Ltd Character cutting system
JPS61206088A (en) * 1985-03-11 1986-09-12 Mitsubishi Electric Corp Character reading device
CN101770576A (en) * 2008-12-31 2010-07-07 北京新岸线网络技术有限公司 Method and device for extracting characters
CN101877050A (en) * 2009-11-10 2010-11-03 青岛海信网络科技股份有限公司 Automatic extracting method for characters on license plate
CN102129560A (en) * 2010-01-18 2011-07-20 富士通株式会社 Method and device for identifying characters
CN102254157A (en) * 2011-07-07 2011-11-23 北京文通图像识别技术研究中心有限公司 Evaluating method for searching character segmenting position between two adjacent characters
CN102402686A (en) * 2011-12-07 2012-04-04 北京云星宇交通工程有限公司 Method for dividing license plate characters based on connected domain analysis
CN102693431A (en) * 2012-05-31 2012-09-26 信帧电子技术(北京)有限公司 Method and device for identifying type of white number plate
CN103207998A (en) * 2012-12-24 2013-07-17 电子科技大学 License plate character segmentation method based on support vector machine
CN103530600A (en) * 2013-06-06 2014-01-22 东软集团股份有限公司 License plate recognition method and system under complicated illumination

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于机器视觉的手写体区域检测和字符分割的研究;李晨;《中国优秀硕士学位论文全文数据库信息科技辑》;20130715;全文 *
基于结构特征点的字符分割技术的研究;张爱娟;《中国优秀硕士学位论文全文数据库信息科技辑》;20141115;全文 *

Also Published As

Publication number Publication date
CN108108734A (en) 2018-06-01

Similar Documents

Publication Publication Date Title
CN108108734B (en) License plate recognition method and device
CN110414507B (en) License plate recognition method and device, computer equipment and storage medium
CN108268867B (en) License plate positioning method and device
CN108073928B (en) License plate recognition method and device
KR101182173B1 (en) Method and system for recognizing vehicle plate
CN108229466B (en) License plate recognition method and device
Khalifa et al. Malaysian Vehicle License Plate Recognition.
CN108197644A (en) A kind of image-recognizing method and device
CN111461131B (en) Identification method, device, equipment and storage medium for ID card number information
CN108090484B (en) License plate recognition method and device
CN105303153A (en) Vehicle license plate identification method and apparatus
CN114387591A (en) License plate recognition method, system, equipment and storage medium
CN111178290A (en) Signature verification method and device
CN112507782A (en) Text image recognition method and device
JP2021135993A (en) Text recognition method, text recognition apparatus, electronic device, and storage medium
CN114049499A (en) Target object detection method, apparatus and storage medium for continuous contour
CN111598076B (en) Method and device for detecting and processing date in label image
CN109741273A (en) A kind of mobile phone photograph low-quality images automatically process and methods of marking
CN108073925B (en) License plate recognition method and device
CN112232336A (en) Certificate identification method, device, equipment and storage medium
WO2022121021A1 (en) Identity card number detection method and apparatus, and readable storage medium and terminal
CN108205670B (en) License plate recognition method and device
CN111199240A (en) Training method of bank card identification model, and bank card identification method and device
CN115410191B (en) Text image recognition method, device, equipment and storage medium
CN109635798B (en) Information extraction method and device

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