CN106874901B - Driving license identification method and device - Google Patents

Driving license identification method and device Download PDF

Info

Publication number
CN106874901B
CN106874901B CN201710030824.7A CN201710030824A CN106874901B CN 106874901 B CN106874901 B CN 106874901B CN 201710030824 A CN201710030824 A CN 201710030824A CN 106874901 B CN106874901 B CN 106874901B
Authority
CN
China
Prior art keywords
character
driving license
double
area
code
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
CN201710030824.7A
Other languages
Chinese (zh)
Other versions
CN106874901A (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.)
Beijing Zhiyuan Future Technology Co ltd
Original Assignee
Beijing Zhiyuan Future 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 Beijing Zhiyuan Future Technology Co ltd filed Critical Beijing Zhiyuan Future Technology Co ltd
Priority to CN201710030824.7A priority Critical patent/CN106874901B/en
Publication of CN106874901A publication Critical patent/CN106874901A/en
Application granted granted Critical
Publication of CN106874901B publication Critical patent/CN106874901B/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/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • G06V10/225Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition based on a marking or identifier characterising the area
    • 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
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/24Character recognition characterised by the processing or recognition method
    • G06V30/242Division of the character sequences into groups prior to recognition; Selection of dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention provides a driving license identification method and a driving license identification device, wherein the method comprises the following steps: receiving and preprocessing a driving license image; determining the position of a seal area on the driving license image; roughly positioning the double-code area of the driving license according to the position relation between the seal area and the double-code area of the driving license and the position of the seal area; finely positioning the coarsely positioned double-code area of the driving license through gray projection and the contrast of the gray value of the pixel point of the character and the background; dividing the character line region according to the shape of each single character and a preset shape rule to obtain a divided single character image; and identifying the single character image through the depth character identification model to obtain the driving license double-code character string corresponding to the driving license image. By the method and the device, the identification accuracy of the driving license is improved.

Description

Driving license identification method and device
Technical Field
The invention relates to the technical field of computer vision, in particular to a driving license identification method and device.
Background
In the applications of car insurance and financial management business, second-hand car transaction business, palm insurance application and the like, the input of the driving license information of a car owner is involved, because the driving license is a certificate without a chip, the driving license can only be manually input, if a vehicle identification code and engine information are manually input, the speed is very slow, the user experience is poor, and the efficiency is low. In order to improve the speed and accuracy of inputting the driving license information, an OCR (Optical Character Recognition) technology is gradually applied to the Recognition of the driving license information to meet the application requirements and bring better experience to the user.
However, the existing driving license recognition method is based on a general OCR framework or an offline OCR classifier, and only uses a printed character image (such as a regular script/sony script) or a character image generated by a computer to perform training to obtain a template corresponding to information on the driving license, and then intercepts the driving license image according to template matching to obtain an image corresponding to the information on the driving license, and further performs recognition of the information on the driving license according to OCR recognition, so that only rough positioning and recognition of the driving license information can be realized, and the recognition accuracy is low; meanwhile, the existing driving license identification method has strict requirements on natural conditions such as image angle/illumination and the like, so that the identification effect on the driving license image in the natural environment is poor, and the identification accuracy is low.
Disclosure of Invention
The embodiment of the invention aims to provide a driving license identification method and a driving license identification device so as to improve the identification accuracy of a driving license. The specific technical scheme is as follows:
in one aspect, an embodiment of the present invention provides a driving license identification method, including:
receiving and preprocessing a driving license image;
determining the position of a seal area on the driving license image;
roughly positioning a double-code area of the running license according to the position relation between the stamp area and the double-code area of the running license and the position of the stamp area, wherein the double-code area of the running license comprises a vehicle identification code and an engine number;
through grey level projection and the contrast of the pixel point grey scale value of character and background, the card double code region that traveles through the coarse positioning is finely fixed a position, and wherein, the card double code region that traveles through the coarse positioning of fine positioning includes: separating a character line area where the double codes of the driving license are located from the driving license image;
dividing the character line region according to the shape of each single character and a preset shape rule to obtain a divided single character image;
and identifying the single character image through a depth character identification model to obtain a driving license double-code character string corresponding to the driving license image.
Optionally, the determining the position of the stamp area on the driver license image includes:
detecting a saliency region on the driver license image, wherein the saliency region comprises a saliency region which is in a preset shape and is prominent in color;
and screening out an area with the highest classification reliability from at least one significant area as the seal area by utilizing a trained support vector machine classifier, wherein the support vector machine classifier is obtained by training according to the color histogram feature and the direction gradient histogram feature of the driving license image.
Optionally, the coarsely positioning the double-code area of the running license according to the position relationship between the stamp area and the double-code of the running license and the position of the stamp area includes:
obtaining the position relation between the seal area and the double code area of the running license from the position relation between the seal area and the double code area of the running license established in advance;
and coarsely positioning the double-code area of the driving license according to the position relation and the position of the seal area.
Optionally, the fine positioning of the coarsely positioned double-code area of the driving license through gray projection and the contrast between the gray value of the pixel point of the character and the background includes:
projecting the double-code region of the driving license in the horizontal direction, respectively obtaining a peak corresponding to the gray value of the maximum pixel point and a trough corresponding to the gray value of the minimum pixel point at the positions corresponding to the character line and the character line interval region, projecting the peak and the trough in the vertical direction, and roughly separating out a first character line region;
determining a first character row region with the number of extreme values exceeding a preset number as a second candidate character row region according to the contrast of the characters and the background and by using the extreme value of the gray value change of the pixel points;
screening out an area with the highest classification credibility as a second character row area from at least one second candidate character row area by using a trained character classifier; the character classifier comprises a character classifier which is trained according to image features.
Optionally, the segmenting the character line region according to the shape of each single character and a preset shape rule to obtain a segmented single character image includes:
according to a rectangle rule, dividing the second character line area to obtain a single character image corresponding to a number or a letter;
and according to the square rule, dividing the second character line region to obtain a single character image corresponding to the Chinese character.
Optionally, the recognizing the single character image through the depth character recognition model to finally obtain the double-code character string of the driving license corresponding to the driving license image includes:
respectively identifying each single character image through the depth character identification model, and returning the identification result of each single character image and the single probability corresponding to the identification result of each single character image;
obtaining the overall probability of identifying the whole driving license image according to the single probability;
and determining the corresponding character string when the overall probability is maximum, wherein the character string is the driving license double-code character string corresponding to the driving license image.
Optionally, after the recognition is performed by the depth character recognition model and the recognition result of each single character image is returned, the method further includes:
checking whether the recognition result of the single character image accords with a double-code rule of double codes of the driving license;
when the recognition result of the single character image does not accord with the double-code rule, the recognition result of the single character image is adjusted to be a result which accords with the double-code rule;
after the character string corresponding to the determined maximum overall probability is the driving license double-code character string corresponding to the driving license image, the method further comprises the following steps:
and checking whether the result of the travel permit double-code character string conforms to the double-code rule or not, and re-identifying the travel permit double-code character string when the result of the travel permit double-code character string does not conform to the double-code rule.
Optionally, the coarsely positioning the double-code area of the running license according to the position relationship between the stamp area and the double-code area of the running license and the position of the stamp area includes:
determining the placement position of the driving license image according to the result of the linear detection of the seal area;
based on the placing position, analyzing the layout position of the driving license image to obtain the position relation between the seal area and the double-code area of the driving license;
and coarsely positioning the double-code area of the driving license according to the position relation and the position of the seal area.
On the other hand, an embodiment of the present invention further provides a driving license recognition apparatus, including:
the receiving processing module is used for receiving and preprocessing the driving license image;
the determining module is used for determining the position of a seal area on the driving license image;
the system comprises a rough positioning module, a rough positioning module and a rough positioning module, wherein the rough positioning module is used for roughly positioning a double-code area of the running license according to the position relation between a stamp area and the double-code area of the running license and the position of the stamp area, and the double-code area of the running license comprises a vehicle identification code and an engine number;
the fine positioning module is used for finely positioning a driving license double-code region passing through the coarse positioning through gray level projection and the contrast ratio of pixel point gray level values of characters and a background, wherein the finely positioning of the driving license double-code region passing through the coarse positioning comprises: separating a character line area where the double codes of the driving license are located from the driving license image;
the segmentation module is used for segmenting the character line region according to the shape of each single character and a preset shape rule to obtain a segmented single character image;
and the recognition module is used for recognizing the single character image through the depth character recognition model to obtain the driving license double-code character string corresponding to the driving license image.
Optionally, the determining module includes:
the detection submodule is used for detecting a saliency area on the driving license image, wherein the saliency area comprises a saliency area with a preset shape and a prominent color;
and the screening submodule is used for screening the region with the highest classification reliability from at least one significant region as a seal region by using the trained support vector machine classifier, wherein the support vector machine classifier is obtained by training according to the color histogram feature and the direction gradient histogram feature of the driving license image.
According to the driving license identification method and device provided by the embodiment of the invention, the seal area on the driving license image can be positioned according to the color and the shape of the driving license image; according to the position of the seal area, coarsely positioning the double-code area of the driving license, and finely positioning the double-code area of the driving license through gray projection; dividing the character line region according to the shape rule of the character to obtain a divided single character image; and then, identifying each single character image through a depth character identification model, and finally obtaining the driving license double-code character string corresponding to the driving license image. The identification accuracy of the driving license in the natural environment is improved. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method for identifying a license in accordance with an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a driving license recognition apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 invention.
Fig. 1 is a flowchart of a driving license identification method according to an embodiment of the present invention, and a detailed description is given to the driving license identification method according to the present invention with reference to fig. 1, including:
step 101: and receiving and preprocessing the driving license image.
When the driving license needs to be identified, the actual driving license picture can be directly used for identification; meanwhile, a driving license image can be obtained through an image acquisition technology, and the actual driving license is identified by identifying the driving license image. The driving license image acquisition can be completed by photographing the actual driving license image through the camera, and certainly, the method is not the only implementation mode for acquiring the driving license image.
In the embodiment of the present invention, the collected driving license image and the actual driving license picture are collectively referred to as a driving license image. After receiving the driving license image, firstly preprocessing the driving license image, wherein the preprocessing the driving license image comprises the following steps: noise reduction, illumination normalization, tilt normalization, and the like.
Step 102, determining the position of the stamp area on the driving license image.
The driving license image comprises information such as a license plate number, a vehicle type, a vehicle owner, a vehicle identification code, an engine number and the like, and also comprises a seal. The actual driving license is observed, and the seal is compared with information such as license plate numbers, vehicle types, all persons, vehicle identification codes, engine numbers and the like, so that the seal is quite prominent.
Therefore, the embodiment of the invention considers that other information on the image of the running license is searched through the seal. The stamp area has distinctive features such as color, shape, character texture, etc. Specifically, the position of the stamp area can be determined from the driving license image through the characteristics of the stamp, and then the position of the required information on the driving license image can be determined according to the position of the stamp area, so that a good condition is provided for accurate identification of the following driving license.
And 103, roughly positioning the double-code area of the running license according to the position relation between the stamp area and the double-code area of the running license and the position of the stamp area, wherein the double-code area of the running license comprises a vehicle identification code and an engine number.
According to the steps, the position of the stamp area on the driving license image can be determined, and after the position of the stamp area is determined, the position of the corresponding other information can be determined according to the position relation between the stamp area and the other information on the driving license.
In the actual application process, the vehicle identification code and the engine number are very important information, and a specific vehicle can be uniquely positioned through the vehicle identification code and the engine number, so that convenience is provided for handling insurance, maintenance, illegal payment and the like in actual life. Meanwhile, the positions of the vehicle identification code and the engine number and the position of the stamp area are more intimate to each other as can be found from the actual driving license, so that the embodiment of the invention focuses on positioning and identifying the vehicle identification code and the engine number.
It should be noted that the method for locating the position of the information on the image of the running license except for the double-code area of the running license through the position of the stamp area is similar to the method for locating the position of the double-code area of the running license on the image of the running license through the position of the stamp area, and thus the description is omitted here. When other information on the driving license image needs to be identified, the position of the other information is determined by referring to a method for positioning the double-code area of the driving license on the driving license image through the position of the stamp area, and then the other information is identified.
It should be noted that, in a natural environment, the placement positions of the running license are different, which has a great influence on the positioning of the stamp region on the running license image and the process of positioning the double-code region of the running license according to the position of the stamp region. Therefore, in an alternative embodiment of the present invention, by first determining the placement position of the driving license, the double-code area of the driving license is roughly located according to the difference of the placement positions of the driving licenses, and specifically, the process includes:
firstly, the placing position of the driving license image is determined according to the straight line detection result of the seal area.
Then, based on the placement position of the driving license image, analyzing the layout position of the driving license image to obtain the position relation between the stamp area and the double code area of the driving license.
And finally, roughly positioning the double-code area of the running license according to the position relation between the stamp area and the double-code area of the running license and the position of the stamp area.
For example, in the stamp area of the normally placed running license, the Chinese characters in the stamp area are arranged line by line from left to right, so that a horizontal straight line is easily detected. Therefore, the arrangement direction of the driving license can be judged according to the result of the line detection, and then the arrangement direction of the driving license (for example, the included angle between the stamp area and the horizontal line is 0 degree, 90 degrees, 180 degrees or 270 degrees) is judged according to the relative position relation between the stamp area and the whole driving license image.
After the placement position of the driving license image is determined, the relative relation between the stamp area and the double-code area of the driving license is found according to the actual placement position of the driving license image, and the double-code area of the driving license is roughly positioned. Therefore, the driving license identification method provided by the embodiment of the invention is not limited by the influence of the placement position of the driving license in the natural environment, and the accuracy of the driving license identification result in the natural environment is improved.
Step 104, finely positioning the coarsely positioned double-code area of the driving license through gray projection and the contrast of the gray value of the pixel point of the character and the background, wherein the finely positioning the coarsely positioned double-code area of the driving license comprises the following steps: and separating the character line area where the double codes of the driving license are positioned from the driving license image.
According to the position relation between the stamp area and the driver license double-code area and the position of the stamp area, the driver license double-code area is roughly positioned, and only the driver license double-code area is roughly positioned from the position. In order to more accurately position the position of the driving license double-code region, the driving license double-code region is finely positioned through more detailed characteristics, wherein the detailed characteristics can be gray values of pixel points in the driving license double-code region on a driving license image and contrast with the background of the whole driving license image.
In addition, after the position of the travel certificate double code area is located, the travel certificate double code is separated from the travel certificate image, because the travel certificate double code exists on the travel certificate image in the form of characters, the finally obtained fine location of the travel certificate double code area results in the separation of the character line area where the travel certificate double code exists.
And 105, segmenting the character line region according to the shape of each single character and a preset shape rule to obtain a segmented single character image.
After the character line area where the driver license double codes are located is obtained, the character line area where all the characters are located is processed, and each individual character is obtained. Since each character is displayed in a predetermined shape on the license image, for example, it can be considered that a chinese character is in a square shape and a numeral is in a rectangular shape. Therefore, in the process of dividing the character line region, the character line region can be divided according to the shape of each character, and each individual character picture is obtained.
Specifically, in an optional embodiment of the present invention, segmenting the character row area according to the shape of each single character and a preset shape rule to obtain a segmented single character image, where the method includes:
on one hand, according to the rectangle rule, the second character line area is divided to obtain a single character image corresponding to the number or the letter.
And on the other hand, according to the square rule, dividing the second character line region to obtain a single character image corresponding to the Chinese character.
Specifically, the preset shape defined by the preset shape rule and different parts of the character line region are respectively matched, when the result is matched, the corresponding region is divided and extracted to be the single character, and the steps are repeated until all the single characters are obtained through division. Or the shapes of different parts of the character line area are judged by taking a plurality of pixel values as intervals, then the obtained shape result is compared to determine whether the shape result accords with the preset shape rule, if so, the part is the correct single character area, the single character is separated, and the steps are repeated until all the single characters are obtained by segmentation.
And step 106, identifying the single character image through the depth character identification model to obtain the driving license double-code character string corresponding to the driving license image.
After each single character picture is obtained, the single character picture is input into the trained deep character recognition model, and the recognition result can be returned by applying the OCR technology. The deep character recognition model is obtained by training through a CNN (convolutional neural Network), and the specific deep character recognition model obtained through CNN training is the prior art and is not described herein again; meanwhile, the OCR technology is a mature technology in the field of driving license recognition, and is not described here again.
And identifying the single character image to obtain a double-code character string of the running license corresponding to the running license image, namely the character line area where the double codes of the running license are positioned on the running license image, and finishing identification to obtain the result of the separated vehicle/identification/generation/number, sending/moving/machine/number/code and the number formed by the following specific numbers and letters.
According to the driving license identification method, the position of the seal area on the driving license image is determined, and the double-code area of the driving license is roughly positioned according to the position relation between the seal area and the double-code area of the driving license; then finely positioning the coarsely positioned double-code area of the driving license through gray projection and the contrast of the gray value of the pixel point of the character and the background; after the character line area where the driving license double-code area is located is obtained through positioning, the character line area is divided according to the shape of each single character and a preset shape rule to obtain a divided single character image, finally, the single character image is identified through a depth character identification model to obtain a driving license double-code area character string corresponding to the driving license image, and driving license identification is completed. By the method for identifying the driving license, the identification accuracy of the driving license is improved.
In an alternative embodiment of the present invention, determining the location of the stamp area on the driver license image includes:
first, a saliency region on a driver license image is detected, wherein the saliency region includes a saliency region of a preset shape and with a prominent color.
The method includes the steps of detecting a significance region with a preset shape and a prominent color on a driving license image, wherein the preset shape can be a square, and the stamp region can be generally a square through statistics and observation of an actual driving license. Meanwhile, the stamp on the running license in the actual application process is generally red which is different from the black of other areas, so in an optional implementation manner of the embodiment of the present invention, the saliency area refers to a square and red area.
And then, screening out an area with the highest classification reliability from at least one significant area by using a trained support vector machine classifier as a seal area, wherein the support vector machine classifier is obtained by training according to the color histogram feature and the direction gradient histogram feature of the driving license image.
Through the process of detecting the significant areas, a plurality of suspected seal areas can be obtained. And further processing is needed to further find the determined seal area from the plurality of suspected seal areas.
In the embodiment of the invention, the final positioning of the determined stamp area from the plurality of suspected stamp areas is completed by the following specific steps, including:
firstly, extracting color histogram features and directional gradient histogram features of a multi-scale driving license image, and connecting the color histogram features and the directional gradient histogram features in series to serve as image features.
And secondly, training an svm (Support Vector Machine) classifier through the image features.
And thirdly, in the accurate seal positioning stage, screening all suspected seal areas by using a trained svm classifier, and selecting the area with the highest classification credibility as the accurate seal area position.
After the stamp area is determined, according to the position relation between the stamp area and the driver license double-code area and the position of the stamp area, the driver license double-code area is roughly positioned, and the method comprises the following steps:
and obtaining the position relation between the stamp area and the double code area of the driving license from the position relation between the stamp area and the double code area of the driving license established in advance.
And coarsely positioning the double-code area of the driving license according to the position relation and the position of the seal area.
The position relationship between the stamp region and the driver license double-code region, that is, the relative relationship between the stamp region and the driver license double-code region, is generally determined, for example, how many pixel points behind the stamp region are the driver license double-code region, which is determined, so that after the position of the stamp region is determined, the position of the driver license double-code region can be obtained according to the relative relationship between the stamp region and the driver license double-code region.
As can be seen from the above description, the position of the driver license double code region is located by the position of the stamp region, and the obtained result is only the result of rough location. In order to more accurately locate the character row area containing the driver license double code area, a more detailed process is also required, and the specific process is as follows.
Through gray projection and the contrast of the pixel point gray value of the character and the background, finely positioning the driving license double-code region through rough positioning, comprising:
firstly, projecting a double-code region of a driving license in the horizontal direction, respectively obtaining a peak corresponding to a maximum pixel point gray value and a trough corresponding to a minimum pixel point gray value at positions corresponding to character line and character line interval regions, projecting the peak and the trough in the vertical direction, and roughly separating a first character line region.
The character region exists on the driving license image and often has obvious texture or edge information, the image which is roughly positioned and contains the driving license double-code region is projected in the horizontal direction, the wave crest corresponding to the maximum pixel point gray value and the wave trough corresponding to the minimum pixel point gray value can be respectively obtained at the position corresponding to the character line and character line interval region, then the wave crest and the wave trough are projected in the vertical direction, and the character line region can be roughly separated.
And then, according to the contrast ratio of the characters and the background, and by using the extreme value of the gray value change of the pixel points, determining the area with the number of the extreme values exceeding the preset number as a second candidate character row area.
In addition, the character area exists on the driving license image, not only has obvious texture or edge information, but also has great contrast with the driving license image, so on the basis, the area with the number of the extreme values exceeding the preset number can be determined as the character line area by utilizing the extreme value of the gray value change of the pixel points. The character line region result obtained by the gray level projection is further refined.
Finally, screening out an area with the highest classification credibility as a second character line area from at least one second candidate character line area by using the trained character classifier; the character classifier comprises a character classifier which is trained according to image features.
The method comprises the steps of manually marking a large number of driving licenses, training by utilizing character features to obtain a character classifier, and finally positioning a character row area obtained by gray level projection and contrast of characters and a background.
The method for identifying the driving license aims to identify the driving license more accurately, and the positioning of the double-code picture of the driving license is an important process.
The method includes the steps of finely positioning a driving license double-code area, namely separating a character line area where the driving license double-code is located from a driving license image, then dividing the whole character line area to obtain a single character image, specifically, dividing the character line area according to the shape of each single character and a preset shape rule to obtain a divided single character image, wherein the content is described in detail above, and the description is omitted here.
Specifically, in an optional embodiment of the present invention, the method for identifying a single character image by using a depth character recognition model to finally obtain a double-code character string of a driving license corresponding to the driving license image includes:
the method comprises the steps of firstly, respectively identifying each single character image through a depth character identification model, and returning the identification result of each single character image and the single probability corresponding to the identification result of each single character image.
And secondly, obtaining the overall probability of identifying the whole driving license image according to the single probability.
And thirdly, determining a corresponding character string when the overall probability is the maximum, wherein the corresponding character string is a driving license double-code character string corresponding to the driving license image.
All single character images obtained by segmenting the character line area are identified, and the identification result of each single character image can be obtained; meanwhile, in the identification process, a specific single character can be identified into different characters according to different probabilities, so that the probability of identifying the image of the single character into the specific character is returned while the identification result is returned. The same processing is carried out on each single character, and finally the recognition results of all the single characters and the probability of recognizing the single characters into corresponding characters can be obtained.
Then, each single character is recognized into all the probabilities of the corresponding characters, the overall probability of recognizing the whole license image is obtained through operation, the specific operation process can be simply adding all the single probabilities, or calculating the weighted sum of all the single probabilities, and the specific weight can be selected according to needs in the actual use process. Of course, the calculation of the overall probability of identifying the entire travel license image is not limited to the two methods described herein, and any method that can calculate the overall probability of identifying the entire travel license image is permissible.
And aiming at each single character, identifying the single character into different specific characters, calculating the corresponding overall probability of identifying the whole driving license image, finally determining the corresponding character string when the overall probability is the maximum, and finishing the whole driving license double-code identification process for the driving license double-code character string corresponding to the driving license image.
It should be noted that, in the actual recognition process, it is inevitable that the recognized characters are characters that the double codes of the license are unlikely to appear in practice, and in order to make the recognition result more accurate, the embodiment of the present invention further optimizes the recognition result. In particular, the optimization process may be after the recognition of each individual character, i.e. checking whether an error is recognized; or the whole recognition result can be optimized after the whole recognition process is finished. Specifically, after the recognition is performed by the depth character recognition model and the recognition result of each single character image is returned, the method includes:
checking the recognition result of the single character image to determine whether the recognition result meets the double-code rule of the double codes of the driving license;
and when the recognition result of the single character image does not accord with the double-code rule, adjusting the recognition result of the single character image into a result which accords with the double-code rule.
For example, the first position in the vehicle identification number represents a production country or area code, and only one of the 123469 wtjsklveryz can be used, if the recognition result is not a character, the recognition result is incorrect, the recognition is carried out again, and the result is optimized.
Similarly, the character string corresponding to the maximum overall probability is determined to be the travel license double-code character string corresponding to the travel license image, and then, the method includes:
and checking whether the result of the double-code character string of the driving license conforms to the double-code rule or not, and re-identifying the double-code character string of the driving license when the result of the double-code character string of the driving license does not conform to the double-code rule. For example, the obtained vehicle identification number, the recognition result of the corresponding character string, whether 17 characters are satisfied, and the like are checked, and the specific double code rule of the driving license is well known by those skilled in the art and will not be described herein.
In an optional embodiment of the present invention, the method for identifying a license of a vehicle according to the embodiment of the present invention may be applied to a system composed of a client and a backend server. The client is developed based on an ios system, and a user selects a specific working mode through the client, wherein the specific working mode can comprise: and the modes comprise standard driving license identification, rotating driving license identification, acquisition of driving license pictures, identification result display and the like. The back-end server runs the identification method of the embodiment of the invention. For example, the rear-end server customizes an algorithm aiming at a double-code identification scene of the driving license, so that the identification precision is high and the identification speed is high; the client does not need to execute a specific calculation process, and only needs to deliver tasks to the back end, so that the client is light, complex calculation is processed by the server, and the power consumption is low. Meanwhile, the identification method of the driving license is easy to expand and is convenient to expand to other items to be identified or the driving license to be identified.
In addition, an embodiment of the present invention further provides a driving license recognition apparatus, fig. 2 is a schematic structural diagram of the driving license recognition apparatus according to the embodiment of the present invention, and the driving license recognition apparatus according to the embodiment of the present invention is described in detail with reference to fig. 2. The method comprises the following steps:
and the receiving processing module 201 is used for receiving and preprocessing the driving license image.
A determining module 202, configured to determine a position of a stamp area on the running license image.
And the rough positioning module 203 is used for roughly positioning the double-code area of the running license according to the position relation between the stamp area and the double-code area of the running license and the position of the stamp area, wherein the double-code area of the running license comprises a vehicle identification code and an engine number.
The fine positioning module 204 is configured to finely position the driving license double-code region through the coarse positioning by means of gray projection and contrast between a pixel gray value of the character and a background, where the finely positioned driving license double-code region through the coarse positioning includes: and separating the character line area where the double codes of the driving license are positioned from the driving license image.
The segmentation module 205 is configured to segment the character line region according to the shape of each single character and a preset shape rule, so as to obtain a segmented single character image.
And the recognition module 206 is configured to recognize the single character image through the depth character recognition model to obtain a driving license double-code character string corresponding to the driving license image.
According to the driving license identification device provided by the embodiment of the invention, the position of a stamp area on a driving license image is determined through the receiving and processing module 201, the determining module 202, the coarse positioning module 203, the fine positioning module 204, the segmentation module 205 and the identification module 206, and the driving license double-code area is coarsely positioned according to the position relation between the stamp area and the driving license double-code area; then finely positioning the coarsely positioned double-code area of the driving license through gray projection and the contrast of the gray value of the pixel point of the character and the background; after the character line area where the double codes of the driving license are located is obtained through positioning, the character line area is divided according to the shape of each single character and a preset shape rule to obtain a divided single character image, finally, the single character image is identified through a depth character identification model to obtain a double code character string of the driving license corresponding to the driving license image, and the driving license identification is completed.
In an optional embodiment of the present invention, the determination module 202 in the driving license recognition apparatus includes:
the detection submodule is used for detecting a saliency area on the driving license image, wherein the saliency area comprises a saliency area which is in a preset shape and is prominent in color.
And the screening submodule is used for screening the region with the highest classification reliability from at least one significant region as a seal region by using the trained support vector machine classifier, wherein the support vector machine classifier is obtained by training according to the color histogram feature and the direction gradient histogram feature of the driving license image.
In an optional embodiment of the present invention, the rough positioning module 203 in the driving license identification apparatus includes:
and the first position relation obtaining submodule is used for obtaining the position relation between the stamp area and the driving license double-code area from the position relation between the stamp area and the driving license double-code area which is established in advance.
And the first coarse positioning submodule is used for coarsely positioning the double-code area of the running license according to the position relation and the position of the seal area.
In an optional embodiment of the present invention, the fine positioning module 204 in the driving license recognition apparatus includes:
and the rough separation submodule is used for performing horizontal direction projection on the double-code region of the driving license, respectively obtaining a peak corresponding to the maximum pixel point gray value and a trough corresponding to the minimum pixel point gray value at the positions corresponding to the character line and character line interval regions, performing vertical direction projection on the peak and the trough, and roughly separating out a first character line region.
And the character row determining submodule is used for determining a first character row area with the number of the extreme values exceeding the preset number as a second candidate character row area according to the contrast of the characters and the background and by utilizing the extreme value of the gray value change of the pixel points.
The character row screening submodule is used for screening an area with the highest classification reliability from at least one second candidate character row area as a second character row area by utilizing the trained character classifier; the character classifier comprises a character classifier which is trained according to image features.
In an optional embodiment of the present invention, the segmentation module 205 in the driving license recognition apparatus includes:
and the first segmentation submodule is used for segmenting the second character line area according to the rectangle rule to obtain a single character image corresponding to the number or the letter.
And the second segmentation submodule is used for segmenting the second character row area according to the square rule to obtain a single character image corresponding to the Chinese character.
In an optional embodiment of the present invention, the identification module 206 in the driving license identification apparatus includes:
and the single result returning submodule is used for respectively identifying each single character image through the depth character identification model and returning the identification result of each single character image and the single probability corresponding to the identification result of each single character image.
And the overall probability calculation submodule is used for obtaining the overall probability for identifying the whole driving license image according to the single probability.
And the result determining submodule is used for determining the corresponding character string when the overall probability is maximum, and is the driving license double-code character string corresponding to the driving license image.
In an optional embodiment of the present invention, the driving license recognition apparatus further includes:
and the checking module is used for checking the recognition result of the single character image to determine whether the recognition result accords with the double-code rule of the double codes of the driving license.
And the first adjusting module is used for adjusting the recognition result of the single character image into a result in accordance with the double-code rule when the recognition result of the single character image does not conform to the double-code rule.
And the second adjusting module is used for checking whether the result of the driving license double-code character string accords with the double-code rule or not, and re-identifying the driving license double-code character string when the result of the driving license double-code character string does not accord with the double-code rule.
In an optional embodiment of the present invention, the rough positioning module 203 in the driving license identification apparatus further includes:
and the placement position determining submodule is used for determining the placement position of the driving license image according to the result of the linear detection of the seal area.
And the second position relation obtaining submodule is used for analyzing the layout position of the driving license image based on the placing position to obtain the position relation between the seal area and the double code area of the driving license.
And the second coarse positioning submodule is used for coarsely positioning the double-code area of the running license according to the position relation and the position of the seal area.
It should be noted that, the apparatus according to the embodiment of the present invention is an apparatus applying the above driving license identification method, and all embodiments of the above driving license identification method are applicable to the apparatus and can achieve the same or similar beneficial effects.
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.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (9)

1. A travel license recognition method, comprising:
receiving and preprocessing a driving license image;
determining the position of a seal area on the driving license image;
roughly positioning a double-code area of the running license according to the position relation between the stamp area and the double-code area of the running license and the position of the stamp area, wherein the double-code area of the running license comprises a vehicle identification code and an engine number;
through grey level projection and the contrast of the pixel point grey scale value of character and background, the card double code region that traveles through the coarse positioning is finely fixed a position, and wherein, the card double code region that traveles through the coarse positioning of fine positioning includes: separating a character line area where the double codes of the driving license are located from the driving license image;
dividing the character line region according to the shape of each single character and a preset shape rule to obtain a divided single character image;
identifying the single character image through a depth character identification model to obtain a driving license double-code character string corresponding to the driving license image;
wherein, through grey level projection and the contrast of the pixel grey value of character and background, finely fix a position through the coarse positioning the license double code region includes:
projecting the double-code region of the driving license in the horizontal direction, respectively obtaining a peak corresponding to the gray value of the maximum pixel point and a trough corresponding to the gray value of the minimum pixel point at the positions corresponding to the character line and the character line interval region, projecting the peak and the trough in the vertical direction, and roughly separating out a first character line region;
determining a first character row region with the number of extreme values exceeding a preset number as a second candidate character row region according to the contrast of the characters and the background and by using the extreme value of the gray value change of the pixel points;
screening out an area with the highest classification credibility as a second character row area from at least one second candidate character row area by using a trained character classifier; the character classifier comprises a character classifier which is trained according to image features.
2. The driving license identification method of claim 1, wherein said determining a location of a stamp region on said driving license image comprises:
detecting a saliency region on the driver license image, wherein the saliency region comprises a saliency region which is in a preset shape and is prominent in color;
and screening out an area with the highest classification reliability from at least one significant area as the seal area by utilizing a trained support vector machine classifier, wherein the support vector machine classifier is obtained by training according to the color histogram feature and the direction gradient histogram feature of the driving license image.
3. The driving license identification method according to claim 2, wherein the coarsely positioning the driving license double-code region based on the positional relationship between the stamp region and the driving license double-code region and the position of the stamp region comprises:
obtaining the position relation between the seal area and the double code area of the running license from the position relation between the seal area and the double code area of the running license established in advance;
and coarsely positioning the double-code area of the driving license according to the position relation and the position of the seal area.
4. The driving license recognition method of claim 1, wherein the step of segmenting the character line region according to the shape of each single character and a preset shape rule to obtain a segmented single character image comprises:
according to a rectangle rule, dividing the second character line area to obtain a single character image corresponding to a number or a letter;
and according to the square rule, dividing the second character line region to obtain a single character image corresponding to the Chinese character.
5. The method for identifying the driving license according to claim 1, wherein the identifying the single character image through a depth character identification model to finally obtain the double-code character string of the driving license corresponding to the driving license image comprises:
respectively identifying each single character image through the depth character identification model, and returning the identification result of each single character image and the single probability corresponding to the identification result of each single character image;
obtaining the overall probability of identifying the whole driving license image according to the single probability;
and determining the corresponding character string when the overall probability is maximum, wherein the character string is the driving license double-code character string corresponding to the driving license image.
6. The driving license recognition method according to claim 5, wherein after the returning of the recognition result of each of the individual character images by the recognition by the depth character recognition model, the method further comprises:
checking whether the recognition result of the single character image accords with a double-code rule of double codes of the driving license;
when the recognition result of the single character image does not accord with the double-code rule, the recognition result of the single character image is adjusted to be a result which accords with the double-code rule;
after the character string corresponding to the determined maximum overall probability is the driving license double-code character string corresponding to the driving license image, the method further comprises the following steps:
and checking whether the result of the travel permit double-code character string conforms to the double-code rule or not, and re-identifying the travel permit double-code character string when the result of the travel permit double-code character string does not conform to the double-code rule.
7. The driving license identification method according to claim 1, wherein the coarsely positioning the driving license double-code region based on the positional relationship between the stamp region and the driving license double-code region and the position of the stamp region comprises:
determining the placement position of the driving license image according to the result of the linear detection of the seal area;
based on the placing position, analyzing the layout position of the driving license image to obtain the position relation between the seal area and the double-code area of the driving license;
and coarsely positioning the double-code area of the driving license according to the position relation and the position of the seal area.
8. A travel certificate recognition apparatus, comprising:
the receiving processing module is used for receiving and preprocessing the driving license image;
the determining module is used for determining the position of a seal area on the driving license image;
the system comprises a rough positioning module, a rough positioning module and a rough positioning module, wherein the rough positioning module is used for roughly positioning a double-code area of the running license according to the position relation between a stamp area and the double-code area of the running license and the position of the stamp area, and the double-code area of the running license comprises a vehicle identification code and an engine number;
the fine positioning module is used for finely positioning a driving license double-code region passing through the coarse positioning through gray level projection and the contrast ratio of pixel point gray level values of characters and a background, wherein the finely positioning of the driving license double-code region passing through the coarse positioning comprises: separating a character line area where the double codes of the driving license are located from the driving license image;
the segmentation module is used for segmenting the character line region according to the shape of each single character and a preset shape rule to obtain a segmented single character image;
the recognition module is used for recognizing the single character image through the depth character recognition model to obtain a driving license double-code character string corresponding to the driving license image;
wherein the fine positioning module comprises:
the rough separation submodule is used for projecting the double-code region of the driving license in the horizontal direction, respectively obtaining a peak corresponding to the gray value of the maximum pixel point and a trough corresponding to the gray value of the minimum pixel point at the positions corresponding to the character line and the character line interval region, and projecting the peak and the trough in the vertical direction to roughly separate a first character line region;
the character row determining submodule is used for determining a first character row area with the number of extreme values exceeding a preset number as a second candidate character row area according to the contrast of the characters and the background and by utilizing the extreme value of the gray value change of the pixel points;
the character row screening submodule is used for screening an area with the highest classification reliability from at least one second candidate character row area as a second character row area by utilizing the trained character classifier; the character classifier comprises a character classifier which is trained according to image features.
9. The driving license recognition device according to claim 8, wherein the determination module includes:
the detection submodule is used for detecting a saliency area on the driving license image, wherein the saliency area comprises a saliency area with a preset shape and a prominent color;
and the screening submodule is used for screening the region with the highest classification reliability from at least one significant region as a seal region by using the trained support vector machine classifier, wherein the support vector machine classifier is obtained by training according to the color histogram feature and the direction gradient histogram feature of the driving license image.
CN201710030824.7A 2017-01-17 2017-01-17 Driving license identification method and device Active CN106874901B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710030824.7A CN106874901B (en) 2017-01-17 2017-01-17 Driving license identification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710030824.7A CN106874901B (en) 2017-01-17 2017-01-17 Driving license identification method and device

Publications (2)

Publication Number Publication Date
CN106874901A CN106874901A (en) 2017-06-20
CN106874901B true CN106874901B (en) 2020-07-03

Family

ID=59157678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710030824.7A Active CN106874901B (en) 2017-01-17 2017-01-17 Driving license identification method and device

Country Status (1)

Country Link
CN (1) CN106874901B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109145723A (en) * 2018-07-09 2019-01-04 长江大学 A kind of seal recognition methods, system, terminal installation and storage medium
CN109190623B (en) * 2018-09-15 2020-12-29 闽江学院 Method for identifying brand and model of projector
CN109409421B (en) * 2018-10-09 2021-12-07 杭州诚道科技股份有限公司 Motor vehicle and driver archive image identification method based on convolutional neural network
CN109919160B (en) * 2019-03-04 2021-03-23 深圳先进技术研究院 Verification code identification method, device, terminal and storage medium
CN110472623B (en) * 2019-06-29 2022-08-09 华为技术有限公司 Image detection method, device and system
CN110569801B (en) * 2019-09-10 2023-06-30 四川星盾科技股份有限公司 Identification method for key content of driving license

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101059836A (en) * 2007-06-01 2007-10-24 华南理工大学 Human eye positioning and human eye state recognition method
CN103870803A (en) * 2013-10-21 2014-06-18 北京邮电大学 Vehicle license plate recognition method and system based on coarse positioning and fine positioning fusion
CN106156768A (en) * 2016-07-01 2016-11-23 屈桢深 The vehicle registration certificate detection method of view-based access control model

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7847938B2 (en) * 2007-10-01 2010-12-07 Maskless Lithography, Inc. Alignment system for optical lithography

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101059836A (en) * 2007-06-01 2007-10-24 华南理工大学 Human eye positioning and human eye state recognition method
CN103870803A (en) * 2013-10-21 2014-06-18 北京邮电大学 Vehicle license plate recognition method and system based on coarse positioning and fine positioning fusion
CN106156768A (en) * 2016-07-01 2016-11-23 屈桢深 The vehicle registration certificate detection method of view-based access control model

Also Published As

Publication number Publication date
CN106874901A (en) 2017-06-20

Similar Documents

Publication Publication Date Title
CN106874901B (en) Driving license identification method and device
US9014432B2 (en) License plate character segmentation using likelihood maximization
WO2019169532A1 (en) License plate recognition method and cloud system
Greenhalgh et al. Recognizing text-based traffic signs
Ye et al. Text detection and recognition in imagery: A survey
US8391560B2 (en) Method and system for image identification and identification result output
CN105528604A (en) Bill automatic identification and processing system based on OCR
CN110503054B (en) Text image processing method and device
CN104751187A (en) Automatic meter-reading image recognition method
CN110222687A (en) Complex background card face information identifying method and system
US10354134B1 (en) Feature classification with spatial analysis
CN101122953A (en) Picture words segmentation method
CN109947273B (en) Point reading positioning method and device
CN111091124B (en) Spine character recognition method
CN112016605A (en) Target detection method based on corner alignment and boundary matching of bounding box
CN109389115B (en) Text recognition method, device, storage medium and computer equipment
CN108960221B (en) Bank card identification method and device based on image
CN111079571A (en) Identification card information identification and edge detection model training method and device
CN113158895A (en) Bill identification method and device, electronic equipment and storage medium
CN108961262A (en) A kind of Bar code positioning method under complex scene
CN106846399B (en) Method and device for acquiring visual gravity center of image
CN111950546A (en) License plate recognition method and device, computer equipment and storage medium
CN116363655A (en) Financial bill identification method and system
CN116994269A (en) Seal similarity comparison method and seal similarity comparison system in image document
CN114387600A (en) Text feature recognition method and device, computer equipment and storage medium

Legal Events

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