CN111428708A - License plate checking method and device, computer equipment and storage medium - Google Patents

License plate checking method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111428708A
CN111428708A CN202010119428.3A CN202010119428A CN111428708A CN 111428708 A CN111428708 A CN 111428708A CN 202010119428 A CN202010119428 A CN 202010119428A CN 111428708 A CN111428708 A CN 111428708A
Authority
CN
China
Prior art keywords
target
comparison
license plate
character string
verified
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.)
Pending
Application number
CN202010119428.3A
Other languages
Chinese (zh)
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.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202010119428.3A priority Critical patent/CN111428708A/en
Publication of CN111428708A publication Critical patent/CN111428708A/en
Priority to PCT/CN2021/070584 priority patent/WO2021169619A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/768Arrangements for image or video recognition or understanding using pattern recognition or machine learning using context analysis, e.g. recognition aided by known co-occurring patterns
    • 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/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • 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
    • 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)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Character Input (AREA)
  • Character Discrimination (AREA)

Abstract

The invention discloses a license plate checking method, a license plate checking device, computer equipment and a storage medium; different deviation comparison modes are determined by comparing the length of a target segmentation character string with the length of a segmentation character string to be verified, characters of the target segmentation character string and characters of the segmentation character string to be verified are compared, a first target comparison position and a second target comparison position are updated according to the deviation comparison modes, when the first target comparison position is the last position, the number of character verification errors is adjusted according to the second comparison result of the last position, and the number of the character verification errors is compared with the number of the character verification errors through preset allowable character verification errors, so that the influence of errors occurring in the license plate recognition process on the license plate verification is well avoided, the passing rate and the accuracy of the license plate recognition are improved, and the misjudgment rate of the license plate verification is reduced.

Description

License plate checking method and device, computer equipment and storage medium
Technical Field
The invention relates to the field of image recognition, in particular to a license plate verification method and device, computer equipment and a storage medium.
Background
With the development of computer graphics and computer science, there are many different methods for recognizing and processing images, especially for processing license plate images. In the process of identifying the license plate image, errors may occur in the processes of image acquisition, image identification and image processing of the license plate number, license plate characters and license plate image characters are matched, but the errors cause the condition that the license plate characters and the license plate image characters are not matched, so that the system judges that the license plate does not exist or the license plate is verified wrongly.
Disclosure of Invention
The embodiment of the invention provides a license plate checking method and device, computer equipment and a storage medium, and aims to solve the problem of high misjudgment rate of license plate checking.
A license plate verification method comprises the following steps:
acquiring a target segmentation character string and a segmentation character string to be verified, wherein the target segmentation character string is a character string corresponding to a target license plate, and the segmentation character string to be verified is a character string corresponding to the license plate to be verified;
comparing the length of the target segmentation character string with the length of the segmentation character string to be verified to obtain a first comparison result, and determining a deviation comparison mode according to the first comparison result;
determining a first target comparison position from the target segmentation character string, and determining a second target comparison position from the segmentation character string to be verified;
comparing the characters at the first target comparison position with the characters at the second target comparison position to obtain a second comparison result;
if the second comparison result is equal and the first target comparison position is not the last position, updating the first target comparison position and the second target comparison position according to a preset sequential comparison mode, and returning to execute the step of comparing the characters at the first target comparison position with the characters at the second target comparison position to obtain a second comparison result;
if the second comparison result is not equal and the first target comparison position is not the last position, updating the first target comparison position and the second target comparison position according to the deviation comparison mode, adding one to the number of character check errors, and returning to execute the step of comparing the characters of the first target comparison position and the characters of the second target comparison position to obtain a second comparison result;
if the first target comparison position is the last position, adjusting the number of character verification errors according to a second comparison result of the last position;
and comparing the number of the character verification errors with a preset number of allowed error verifications, and if the number of the character verification errors is not more than the preset number of allowed error verifications, the verification is successful.
A license plate verification device comprising:
the license plate checking system comprises a first obtaining module, a second obtaining module and a checking module, wherein the first obtaining module is used for obtaining a target segmentation character string and a segmentation character string to be checked, the target segmentation character string is a character string corresponding to a target license plate, and the segmentation character string to be checked is a character string corresponding to a license plate to be checked;
the first comparison module is used for comparing the length of the target segmentation character string with the length of the segmentation character string to be verified to obtain a first comparison result, and determining a deviation comparison mode according to the first comparison result;
the comparison position setting module is used for determining a first target comparison position from the target segmentation character string and determining a second target comparison position from the segmentation character string to be verified;
the second comparison module is used for comparing the characters at the first target comparison position with the characters at the second target comparison position to obtain a second comparison result;
a first updating module, configured to update the first target comparison position and the second target comparison position according to a preset sequential comparison manner when the second comparison result is equal and the first target comparison position is not the last position, and return to perform the step of comparing the characters at the first target comparison position with the characters at the second target comparison position to obtain a second comparison result;
a second updating module, configured to update the first target comparison position and the second target comparison position according to the deviation comparison manner when the second comparison result is unequal and the first target comparison position is not the last position, add one to the number of character verification errors, and return to the step of performing the comparison between the characters at the first target comparison position and the characters at the second target comparison position to obtain a second comparison result;
the adjusting module is used for adjusting the number of the character verification errors according to a second comparison result of the last position when the first target comparison position is the last position;
and the third comparison module is used for comparing the number of the character verification errors with a preset number of allowed error verifications, and if the number of the character verification errors is not more than the preset number of allowed error verifications, the verification is successful.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the license plate verification method when executing the computer program.
A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the above-mentioned license plate verification method.
The license plate checking method, the device, the computer equipment and the storage medium determine different deviation comparison modes through the result of comparing the length of the target segmentation character string with the length of the segmentation character string to be checked, comparing the characters of the target segmentation character string with the characters of the segmentation character string to be verified, updating a first target comparison position and a second target comparison position according to the deviation comparison mode, when the first target comparison position is the last position, and adjusting the number of character verification errors according to the second comparison result of the last position, and comparing the number of preset allowable character verification errors with the number of character verification errors, so that the influence of errors occurring in the license plate recognition process on the license plate verification is better avoided, the passing rate and the accuracy of the license plate recognition are improved, and the misjudgment rate of the license plate verification is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a schematic diagram of an application environment of a license plate verification method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a license plate checking method according to an embodiment of the present invention;
FIG. 3 is another flowchart of a license plate checking method according to an embodiment of the invention;
FIG. 4 is a schematic block diagram of a license plate checking device according to an embodiment of the present invention;
FIG. 5 is another schematic block diagram of a license plate checking apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a computer device according to an embodiment of the 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 some, not all, embodiments of the present invention. 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.
The license plate checking method provided by the embodiment of the invention can be applied to an application environment as shown in fig. 1, and particularly, the license plate checking method is applied to a license plate checking system, the license plate checking system comprises a client and a server as shown in fig. 1, and the client and the server are communicated through a network and are used for solving the problem of high misjudgment rate of license plate checking. The client is also called a client, and refers to a program corresponding to the server and providing local services to the client. The client may be installed in, but not limited to, various personal computers, notebook computers, smart phones, and tablet computers. The server may be implemented as a stand-alone server or as a server cluster consisting of a plurality of servers.
In an embodiment, as shown in fig. 2, a license plate verification method is provided, which is described by taking the application of the method to the server in fig. 1 as an example, and includes the following steps:
s10: acquiring a target segmentation character string and a segmentation character string to be verified, wherein the target segmentation character string is a character string corresponding to a target license plate, and the segmentation character string to be verified is a character string corresponding to the license plate to be verified;
the target segmentation character string is obtained by performing character segmentation on a target license plate, and the target license plate is a real automobile license plate. The to-be-verified segmented character string is obtained by performing character segmentation on the license plate to be verified, and the license plate to be verified is obtained by recognizing the license plate image of the vehicle to be verified. Specifically, a character segmentation method can be adopted to perform character segmentation processing on the target license plate and the license plate to be verified respectively, so as to obtain a target segmentation character string and a segmentation character string to be verified.
S20: comparing the length of the target segmentation character string with the length of the segmentation character string to be verified to obtain a first comparison result, and determining a deviation comparison mode according to the first comparison result;
wherein, the first comparison result is a result indicating the relationship between the length of the target segmentation character string and the length of the segmentation character string to be verified. The segmented character string to be verified is obtained by performing character segmentation on the license plate to be verified, and the license plate to be verified is obtained by scanning and recognizing through the image recognition system, so that in the process of scanning and recognizing the license plate to be verified by adopting the image recognition system, the phenomenon that the character length of the license plate to be verified is too long or too short can occur due to recognition errors, namely the length of the segmented character string to be verified is possibly different from the length of the target segmented character string.
Specifically, the length value of the target segmentation character string and the length value of the segmentation character string to be verified are respectively calculated, then the length value of the target segmentation character string is compared with the length value of the segmentation character string to be verified, so that a first comparison result is obtained, and then a deviation comparison mode is determined according to the first comparison result. It can be understood that, the first comparison result may be that if the length of the target segmented character string is the same as the length of the segmented character string to be verified, the corresponding deviation comparison manner is the first deviation comparison manner; if the length of the target segmentation character string is greater than that of the segmentation character string to be verified, the corresponding deviation comparison mode is a second deviation comparison mode; if the length of the target segmentation character string is smaller than that of the segmentation character string to be verified, the corresponding deviation comparison mode is a third deviation comparison mode.
S30: and determining a first target comparison position from the target segmentation character string, and determining a second target comparison position from the segmentation character string to be verified.
The first target comparison position is a position where any character in the target segmentation character string is located, and preferably, the first target comparison position may be a first position of the target segmentation character string in a left-to-right order, or may be a first position of the target segmentation character string in a right-to-left order; the second target comparison position is a position where any character in the segmented character string to be verified is located, and preferably, the second target comparison position may be a first position of the segmented character string to be verified in a left-to-right sequence, or a first position of the segmented character string to be verified in a right-to-left sequence. The first target comparison position and the second target comparison position are in the same order, and it can be understood that if the first target comparison position is the first position of the target segmentation character string in the left-to-right order, the second target comparison position is the first position of the to-be-verified segmentation character string in the left-to-right order.
S40: and comparing the characters at the first target comparison position with the characters at the second target comparison position to obtain a second comparison result.
The basis for checking whether the target license plate is the same as the license plate to be checked is as follows: and checking whether the target license plate character string is the same as the license plate character string to be checked, so that the characters at the first target comparison position need to be compared with the characters at the second target comparison position. The characters at the first target comparison position are characters corresponding to the first target comparison position in the target segmentation character string, and the characters at the second target comparison position are characters corresponding to the second target comparison position in the segmentation character string to be verified. Specifically, the characters at the first target comparison position are converted into corresponding ASCII values to obtain first ASCII values, the characters at the second target comparison position are converted into corresponding ASCII values to obtain second ASCII values, and the first ASCII values and the second ASCII values are compared to obtain second comparison results. The second comparison result is obtained by comparing the characters at the first target comparison position with the characters at the second target comparison position, and the second comparison result may include equality and inequality.
S50: and if the second comparison result is equal and the first target comparison position is not the last position, updating the first target comparison position and the second target comparison position according to a preset sequential comparison mode, and returning to execute the step of comparing the characters at the first target comparison position with the characters at the second target comparison position to obtain a second comparison result.
When the characters at the first target comparison position are compared with the characters at the second target comparison position, and a second comparison result is equal, and the first target comparison position is not the last position, the first target comparison position and the second target comparison position should be moved one bit in a preset sequence direction, and the comparison is continued. The preset sequential comparison mode refers to a mode that the target segmentation character string and the segmentation character string to be verified are sequentially subjected to character comparison according to the same character direction. It can be understood that, if the first target comparison position update sequence is determined according to the target segmentation character string from left to right, and the second target comparison position update sequence is also determined according to the to-be-verified segmentation character string from left to right, the preset sequential comparison mode is to move the first target comparison position one bit to right and move the second target comparison position one bit to right. If the first target comparison position updating sequence is determined according to the sequence from right to left of the target segmentation character string, and the second target comparison position updating sequence is also determined according to the sequence from right to left of the segmentation character string to be verified, the preset sequential comparison mode is that the first target comparison position is moved one bit to left, and the second target comparison position is moved one bit to left.
After the first target comparison position and the second target comparison position are updated, returning to execute the step of comparing the characters at the first target comparison position with the characters at the second target comparison position to obtain a second comparison result, that is, performing character comparison according to the updated first target comparison position and the second target comparison position, and further selecting a corresponding execution step according to the second comparison result (S50 or S60 or 70).
S60: and if the second comparison result is not equal and the first target comparison position is not the last position, updating the first target comparison position and the second target comparison position according to the deviation comparison mode, adding one to the number of character check errors, and returning to execute the step of comparing the characters of the first target comparison position and the characters of the second target comparison position to obtain a second comparison result.
In this step, the fact that the first target matching position is not the last position means that the character indicated by the first target matching position in the target segmented character string is not the last character. And if the second comparison result is not equal and the two conditions that the first target comparison position is not the last position are both met, updating the first target comparison position and the second target comparison position according to the deviation comparison mode.
Optionally, the deviation comparing method may be that the first target comparing position is moved by one bit toward the target direction, and the second target comparing position is moved by one bit toward the target direction; or the first target comparison position is moved to the target direction by one bit, and the second target comparison position is kept unchanged;
the first target comparison position may be kept unchanged, and the second target comparison position may be moved by one bit toward the target direction.
Wherein the target direction is a preset moving direction. For example, the target direction may be from left to right or from right to left. It is understood that the target direction is the same as the contrast sequence of the characters, and if the contrast sequence of the characters is from the first left, the target direction may be from left to right. If the comparison is started from the first bit on the right, the target direction may be from right to left.
The number of the character verification errors is used for counting a second comparison result, in the comparison process of a target segmentation character string and a segmentation character string to be verified, whether the number of the character verification errors needs to be increased is determined according to the second comparison result executed in the step, if the second comparison result executed in the step is unequal, the number of the character verification errors is increased, understandably, when the second comparison result is unequal once in the step execution, the number of the character verification errors is increased by 1, and when the second comparison result is unequal twice in the step execution, the number of the character verification errors is increased by 2, and so on. The number of character check errors may initially be set to 0. In this step, if the second comparison result is not equal and the first target comparison position is not the last position, the number of character verification errors is incremented by one. Optionally, an error counter may be adopted, if the second comparison result of the characters at the first target comparison position and the second target comparison position is not equal, the error counter is incremented by 1, and after the comparison is completed and the first target comparison position is the last position, the reading of the error counter is checked to obtain the number of the character verification errors.
After the first target comparison position and the second target comparison position are updated, returning to execute the step of comparing the characters at the first target comparison position with the characters at the second target comparison position to obtain a second comparison result, that is, performing character comparison according to the updated first target comparison position and the second target comparison position, and further selecting a corresponding execution step according to the second comparison result (S50 or S60 or 70).
S70: and if the first target comparison position is the last position, adjusting the number of the character verification errors according to a second comparison result of the last position.
If the first target comparison position is the last position, the comparison process of the target segmentation character string and the segmentation character string to be verified is completed, a loop is skipped, and the number of character verification errors is adjusted according to a second comparison result of the last position. Specifically, if the second comparison result at the last position is equal, the number of character verification errors is not increased or decreased, or zero-adding and zero-decreasing operations are performed. And if the second comparison result of the last position is not equal, adding one to the number of the character check errors.
S80: and comparing the number of the character verification errors with a preset number of allowed error verifications, and if the number of the character verification errors is not more than the preset number of allowed error verifications, the verification is successful.
The number of the allowed character verification errors is the number of the allowed comparison errors in the comparison process of the characters at the first target comparison position and the characters at the second target comparison position. Alternatively, the allowable error check number may be set to 1 or 2. The method can be specifically set according to the actual precision requirement of the length of the target license plate character string.
If the number of the character verification errors is smaller than or equal to the preset number of the allowed error verifications, the license plate to be verified is judged to be verified successfully, and if the number of the character verification errors is larger than the preset number of the allowed error verifications, the license plate to be verified is judged to be verified to be failed in verification.
Optionally, a preset character device may be provided, and for comparison between different target license plates and license plates to be verified, the number of allowed character verification errors may be preset by the preset character device, and compared with the number of errors counted by the error counter finally.
In the embodiment, different deviation comparison modes are determined by comparing the length of the target segmentation character string with the length of the segmentation character string to be verified, the characters of the target segmentation character string are compared with the characters of the segmentation character string to be verified, the comparison position of the first target and the comparison position of the second target are updated according to the deviation comparison modes, when the comparison position of the first target is the last position, the number of the character verification errors is adjusted according to the second comparison result of the last position, and the comparison is performed through the preset number of the allowed character verification errors and the number of the character verification errors, so that the influence of errors generated in the license plate recognition process on the license plate verification is avoided, the passing rate and the accuracy of the license plate recognition are improved, and the misjudgment rate of the license plate verification is reduced.
In an embodiment, as shown in fig. 3, before the obtaining of the target segmented character string and the segmented character string to be verified, the method further includes the following steps:
s90: acquiring a license plate verification request, wherein the license plate verification request comprises a target license plate and a license plate to be verified;
the license plate verification request refers to a request triggered during license plate verification. The target license plate refers to an accurate license plate number obtained from a license plate system database. The license plate system database is a database for storing license plate numbers registered by the system. For example: when a certain vehicle enters the parking lot, the license plate number of the vehicle is firstly subjected to system registration, and the registered license plate number is stored in the license plate system database.
The license plate to be verified refers to the license plate to be verified. Specifically, the license plate to be verified is obtained by scanning and recognizing the license plate number of a certain vehicle through an image recognition system. For example, when a certain vehicle leaves a parking lot, the image recognition system scans and recognizes the license plate of the vehicle to confirm whether registration is performed, which is beneficial to subsequently calculating the parking time and the transaction amount of the vehicle. It can be understood that, in this embodiment, the target license plate and the license plate to be verified included in the license plate verification request are license plates acquired at different times or occasions for the same vehicle.
For example: in an application scene, the method operates a license plate checking system based on a parking lot, when a certain vehicle to be checked leaves the parking lot, the license plate number of the vehicle is firstly scanned and identified through an image identification system to obtain the license plate to be checked, a target license plate corresponding to the vehicle is obtained from a license plate system database, and a license plate checking request is triggered and generated, wherein the license plate checking request comprises the target license plate and the license plate to be checked.
S100: and performing character segmentation processing on the target license plate and the license plate to be verified to obtain a target segmentation character string and a segmentation character string to be verified.
The method comprises the steps of checking whether a target license plate is the same as a license plate to be checked, checking whether characters of the target license plate are corresponding to characters of the license plate to be checked or not, and comparing the characters of the target license plate with the characters of the license plate to be checked only after the target license plate and the license plate to be checked are obtained, and performing character segmentation processing on the target license plate and the license plate to be checked.
In this embodiment, the target license plate and the license plate to be verified are divided into character strings formed by independent characters by performing character division on the target license plate and the license plate to be verified, so that the length of the character string to be divided by the target and the length of the character string to be divided by the verification in the subsequent steps are conveniently compared, and the characters of the character string to be divided by the target and the characters of the character string to be divided by the verification in the subsequent steps are compared.
In an embodiment, the determining a deviation comparing manner according to the first comparing result includes:
if the first comparison result is that the length of the target segmentation character string is equal to the length of the segmentation character string to be verified, the deviation comparison mode is a first deviation comparison mode; the first deviation comparison mode is as follows: and moving the first target comparison position by one bit towards the target direction, and moving the second target comparison position by one bit towards the target direction.
The target direction is the direction from left to right if the updating sequence of the first target comparison position is determined according to the left-to-right sequence of the target segmentation character string and the updating sequence of the second target comparison position is also determined according to the left-to-right sequence of the segmentation character string to be verified.
For example, assume that the target license plate is "yue S50010", and the license plate to be verified, which is identified by the image recognition system, is "yue S50O 10".
After character segmentation, the target segmentation character strings of 'Guangdong', 'S', '5', '0', '1' and '0' can be obtained, the length of the target segmentation character strings is 7, and the characters of the first target comparison position are determined according to the sequence from left to right, namely the characters of the first target comparison position are 'Guangdong';
after character segmentation, the segmented character strings to be verified are 'Guangdong', 'S', '5', '0', 'O', '1' and '0', the length of the segmented character strings to be verified is 7, and characters of a second target comparison position are determined according to the sequence from left to right, namely the characters of the second target comparison position are 'Guangdong';
and comparing the character 'Yue' at the first target comparison position with the character 'Yue' at the second target comparison position. And if the second comparison result is equal, updating the first target comparison position and the second target comparison position according to a preset sequential comparison mode, namely updating the character of the first target comparison position to be S and the character of the second target comparison position to be S, returning to execute the comparison of the character of the first target comparison position and the character of the second target comparison position, and repeating the steps until the character of the first target comparison position is updated to be the number 0 and the character of the second target comparison position is updated to be the letter O. And if the second comparison result is unequal, updating the first target comparison position and the second target comparison position according to the first deviation comparison mode, moving the first target comparison position to the target direction by one position, moving the second target comparison position to the target direction by one position, namely updating the character of the first target comparison position to be 1, updating the character of the second target comparison position to be 1, and completing comparison until the first target comparison position is the last position, so that the number of character verification errors is 1.
In this embodiment, when the length of the target segmented character string is equal to the length of the segmented character string to be verified, it is considered that an error may be obtained if an error occurs in the processes of image acquisition, image recognition and image processing of the license plate number. For example, the license plate "yue S50010" is collected, processed and identified to obtain "yue S50O 10". When the second comparison results are unequal, the number is counted as the number of character verification errors, the license plate verification failure is not directly judged, and the license plate verification is judged whether to be the failure or not by comparing the number with the preset number of allowed verification errors in the subsequent steps, so that the recognition efficiency is ensured, the passing rate of license plate recognition is improved, and the misjudgment rate caused by image acquisition, image processing or image recognition errors is reduced. Considering that the probability of similar license plates appearing in the same place is very low and the probability of similar license plates appearing in the same parking lot at the same time is very low, the scheme well reduces the misjudgment rate caused by image acquisition, image processing or image recognition errors by considering the situation.
In an embodiment, the determining a deviation comparison manner according to the first comparison result includes:
and if the first comparison result is that the length of the target segmentation character string is greater than that of the segmentation character string to be verified, the deviation comparison mode is a second deviation comparison mode, the second deviation comparison mode is that the first target comparison position is moved to the target direction by one bit, and the second target comparison position is kept unchanged.
For example, assume that the target license plate is "yue S50010", and the license plate to be verified identified by the image recognition system is "yue S5010".
After character segmentation, the target segmentation character strings of 'Guangdong', 'S', '5', '0', '1' and '0' can be obtained, the length of the target segmentation character strings is 7, and the characters of the first target comparison position are determined according to the sequence from left to right, namely the characters of the first target comparison position are 'Guangdong';
after character segmentation, the segmented character strings to be verified are obtained as 'Guangdong', 'S', '5', '0', '1' and '0', the length of the segmented character strings to be verified is 6, and characters of a second target comparison position are determined according to the sequence from left to right, namely the characters of the second target comparison position are 'Yue';
and comparing the character 'Yue' at the first target comparison position with the character 'Yue' at the second target comparison position. And if the second comparison result is equal, updating the first target comparison position and the second target comparison position according to a preset sequential comparison mode, namely updating the character of the first target comparison position to be S and the character of the second target comparison position to be S, returning to execute the comparison of the character of the first target comparison position and the character of the second target comparison position, and repeating the steps until the character of the first target comparison position is updated to be 0 and the character of the second target comparison position is updated to be 1. And if the second comparison result is unequal, updating the first target comparison position and the second target comparison position according to a second deviation comparison mode, moving the first target comparison position to the target direction by one bit, keeping the second target comparison position unchanged, namely updating the character of the first target comparison position to be 1, keeping the character of the second target comparison position to be 1, and keeping the second comparison result to be equal. And completing comparison until the first target direction is the last position, and obtaining that the number of character checking errors is 1.
In this embodiment, when the length of the target segmentation character string is greater than the length of the segmentation character string to be verified, it is considered that in the image recognition and image processing processes of the license plate number, if missing recognition occurs or deviation occurs in the character segmentation process, an erroneous license plate image may be obtained. For example, the license plate "yue S50010" is collected, identified and image-processed to obtain "yue S5010". When the second comparison results are unequal, the license plate verification failure is not directly judged, but a mode that the first target comparison position moves one bit towards the target direction and the second target comparison position keeps unchanged is used as an updating mode of the comparison position according to a deviation comparison mode when the length of the target segmentation character string is larger than that of the segmentation character string to be verified, and the number of character error verification is counted.
In an embodiment, the determining a deviation comparison manner according to the first comparison result includes:
if the first comparison result is that the length of the target segmentation character string is smaller than that of the segmentation character string to be verified, the deviation comparison mode is a third deviation comparison mode; and the third deviation comparison mode is that the first target comparison position is kept unchanged, and the second target comparison position is moved to the target direction by one bit.
For example, assume that the target license plate is "yue S50010", and the license plate to be verified, which is identified by the image recognition system, is "yue S500010".
After character segmentation, the target segmentation character strings of 'Guangdong', 'S', '5', '0', '1' and '0' can be obtained, the length of the target segmentation character strings is 7, and the characters of the first target comparison position are determined according to the sequence from left to right, namely the characters of the first target comparison position are 'Guangdong';
after character segmentation, the segmented character strings to be verified are obtained as 'Guangdong', 'S', '5', '0', '1' and '0', the length of the segmented character strings to be verified is 8, and characters of a second target comparison position are determined according to the sequence from left to right, namely the characters of the second target comparison position are 'Guangdong';
comparing the characters 'Guangdong' of the first target comparison position with the characters 'Guangdong' of the second target comparison position, wherein the second comparison result is equal, updating the first target comparison position and the second target comparison position according to a preset sequential comparison mode, namely updating the characters of the first target comparison position to be 'S' and the characters of the second target comparison position to be 'S', returning to execute the comparison of the characters of the first target comparison position and the characters of the second target comparison position, analogizing until the characters of the first target comparison position are updated to be '1', the characters of the second target comparison position are updated to be '0', the second comparison result is unequal, updating the first target comparison position and the second target comparison position according to a third deviation comparison mode, and keeping the first target comparison position unchanged, and moving the second target comparison position to the target direction by one bit, namely keeping the character of the first target comparison position as 1, updating the character of the second target comparison position as 1, and enabling the second comparison result to be equal. And completing comparison until the first target direction is the last position, and obtaining that the number of character checking errors is 1.
In this embodiment, when the length of the target segmentation character string is smaller than that of the segmentation character string to be verified, it is considered that in the image recognition and image processing processes of the license plate number, if repeated recognition occurs or a deviation occurs in the character segmentation process, an erroneous license plate image may be obtained. For example, the license plate "yue S50010" is collected, identified and image-processed to obtain "yue S500010". When the second comparison results are unequal, the license plate verification is not directly judged to be failed, but a mode that the comparison position of the first target is kept unchanged and the comparison position of the second target moves one bit towards the target direction is used as an updating mode of the comparison position according to a deviation comparison mode that the length of the target segmentation character string is smaller than that of the segmentation character string to be verified, and the number of character error verification is counted.
Optionally, in an embodiment, before the comparing the second comparison result with the number of allowed character verification errors, the license plate verification method further includes the following steps:
determining an upper limit value of the number of the allowed character checking errors according to the length of the target character string of the target license plate;
determining a lower limit value of the number of the allowed character checking errors according to a preset strategy;
the number of the allowed character verification errors is set within a certain range, the ranges set for different target license plates are different, the ranges are determined by setting an upper limit value and a lower limit value, and the upper limit value is determined by the target character string length of the target license plate, namely, the upper limit value cannot exceed the target character string length of the target license plate. The preset strategy means that the lower limit value of the number of the allowed character check errors is greater than 0.
And determining the number of allowed character check errors based on the upper limit value and the lower limit value.
And determining the number of the allowed character check errors between the upper limit value and the lower limit value according to the set upper limit value and lower limit value.
Optionally, a predetermined character device may be provided for receiving a predetermined number of allowed character check errors for subsequent comparison with the second comparison result.
In the embodiment, the number of the preset allowed character verification errors is regulated within a reasonable range, namely, the comparison with the second comparison result is facilitated, and the number of the set allowed character verification errors cannot exceed the range and is meaningless.
In an embodiment, a license plate verification device is provided, and the license plate verification device corresponds to the license plate verification methods in the embodiments one to one. As shown in fig. 4, the license plate checking device includes a first obtaining module 10, a first comparing module 20, a comparing position setting module 30, a second comparing module 40, a first updating module 50, a second updating module 60, an adjusting module 70, and a third comparing module 80. The functional modules are explained in detail as follows:
the system comprises a first obtaining module 10, a first verification module and a second verification module, wherein the first obtaining module is used for obtaining a target segmentation character string and a segmentation character string to be verified, the target segmentation character string is a character string corresponding to a target license plate, and the segmentation character string to be verified is a character string corresponding to a license plate to be verified;
the first comparison module 20 is configured to compare the length of the target segmentation character string with the length of the segmentation character string to be verified to obtain a first comparison result, and determine a deviation comparison mode according to the first comparison result;
a comparison position setting module 30, configured to determine a first target comparison position from the target segmented character string, and determine a second target comparison position from the segmented character string to be verified;
the second comparison module 40 is configured to compare the characters at the first target comparison position with the characters at the second target comparison position to obtain a second comparison result;
a first updating module 50, configured to update the first target comparison position and the second target comparison position according to a preset sequential comparison manner when the second comparison result is equal and the first target comparison position is not the last position, and return to perform the step of comparing the characters at the first target comparison position with the characters at the second target comparison position to obtain a second comparison result;
a second updating module 60, configured to update the first target comparison position and the second target comparison position according to the deviation comparison method when the second comparison result is unequal and the first target comparison position is not the last position, add one to the number of character verification errors, and return to the step of performing the comparison between the characters in the first target comparison position and the characters in the second target comparison position to obtain a second comparison result;
an adjusting module 70, configured to adjust the number of character verification errors according to a second comparison result of a last position when the first target comparison position is the last position;
the third comparing module 80 is configured to compare the number of the character verification errors with a preset number of allowable error verifications, and if the number of the character verification errors is not greater than the preset number of allowable error verifications, the verification is successful.
Preferably, as shown in fig. 5, the license plate verification apparatus further includes:
the second obtaining module 90 is configured to obtain a license plate verification request, where the license plate verification request includes a target license plate and a license plate to be verified;
and the character segmentation module 100 is configured to perform character segmentation processing on the target license plate and the license plate to be verified to obtain a target segmentation character string and a segmentation character string to be verified.
Preferably, the first comparison module 20 further includes:
a first deviation comparison module, configured to, when the first comparison result is that the length of the target segmented character string is equal to the length of the segmented character string to be verified, determine that the deviation comparison mode is a first deviation comparison mode, where the first deviation comparison mode is: and moving the first target comparison position by one bit towards the target direction, and moving the second target comparison position by one bit towards the target direction.
Preferably, the first comparison module 20 further includes:
and the second deviation comparison module is used for comparing the second deviation comparison mode when the first comparison result is that the length of the target segmentation character string is greater than that of the segmentation character string to be verified, wherein the second deviation comparison mode is that the first target comparison position is moved to the target direction by one bit, and the second target comparison position is kept unchanged.
Preferably, the first comparison module 20 further includes:
and the third deviation comparison module is used for moving the second target comparison position to the target direction by one bit, wherein the deviation comparison mode is a third deviation comparison mode when the first comparison result shows that the length of the target segmentation character string is smaller than that of the segmentation character string to be verified, and the third deviation comparison mode is that the first target comparison position is kept unchanged.
For specific limitations of the license plate verification device, reference may be made to the above limitations of the license plate verification method, which are not described herein again. All modules in the license plate checking device can be completely or partially realized through software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing the data used in the license plate verification method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a license plate verification method.
In one embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the license plate verification method in the above embodiments.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the license plate verification method in the above-mentioned embodiments.
It will be understood by those of ordinary skill in the art that all or a portion of the processes of the methods of the embodiments described above may be implemented by a computer program that may be stored on a non-volatile computer-readable storage medium, which when executed, may include the processes of the embodiments of the methods described above, wherein any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A license plate verification method is characterized by comprising the following steps:
acquiring a target segmentation character string and a segmentation character string to be verified, wherein the target segmentation character string is a character string corresponding to a target license plate, and the segmentation character string to be verified is a character string corresponding to the license plate to be verified;
comparing the length of the target segmentation character string with the length of the segmentation character string to be verified to obtain a first comparison result, and determining a deviation comparison mode according to the first comparison result;
determining a first target comparison position from the target segmentation character string, and determining a second target comparison position from the segmentation character string to be verified;
comparing the characters at the first target comparison position with the characters at the second target comparison position to obtain a second comparison result;
if the second comparison result is equal and the first target comparison position is not the last position, updating the first target comparison position and the second target comparison position according to a preset sequential comparison mode, and returning to execute the step of comparing the characters at the first target comparison position with the characters at the second target comparison position to obtain a second comparison result;
if the second comparison result is not equal and the first target comparison position is not the last position, updating the first target comparison position and the second target comparison position according to the deviation comparison mode, adding one to the number of character check errors, and returning to execute the step of comparing the characters of the first target comparison position and the characters of the second target comparison position to obtain a second comparison result;
if the first target comparison position is the last position, adjusting the number of character verification errors according to a second comparison result of the last position;
and comparing the number of the character verification errors with a preset number of allowed error verifications, and if the number of the character verification errors is not more than the preset number of allowed error verifications, the verification is successful.
2. The license plate verification method of claim 1, wherein before the obtaining of the target segmented character string and the segmented character string to be verified, the license plate verification method further comprises:
acquiring a license plate verification request, wherein the license plate verification request comprises a target license plate and a license plate to be verified;
and performing character segmentation processing on the target license plate and the license plate to be verified to obtain a target segmentation character string and a segmentation character string to be verified.
3. The license plate verification method of claim 1, wherein the determining a deviation comparison manner according to the first comparison result comprises:
if the first comparison result is that the length of the target segmentation character string is equal to the length of the segmentation character string to be verified, the deviation comparison mode is a first deviation comparison mode, and the first deviation comparison mode is as follows: and moving the first target comparison position by one bit towards the target direction, and moving the second target comparison position by one bit towards the target direction.
4. The license plate verification method of claim 1, wherein determining a deviation comparison manner according to the first comparison result further comprises:
if the first comparison result is that the length of the target segmentation character string is greater than that of the segmentation character string to be verified, the deviation comparison mode is a second deviation comparison mode, the second deviation comparison mode is that the first target comparison position is moved to the target direction by one bit, and the second target comparison position is kept unchanged.
5. The license plate verification method of claim 1, wherein determining a deviation comparison manner according to the first comparison result further comprises:
and if the first comparison result is that the length of the target segmentation character string is smaller than that of the segmentation character string to be verified, the deviation comparison mode is a third deviation comparison mode, the third deviation comparison mode is that the first target comparison position is kept unchanged, and the second target comparison position is moved to the target direction by one bit.
6. A license plate verifying attachment, characterized by comprising:
the license plate checking system comprises a first obtaining module, a second obtaining module and a checking module, wherein the first obtaining module is used for obtaining a target segmentation character string and a segmentation character string to be checked, the target segmentation character string is a character string corresponding to a target license plate, and the segmentation character string to be checked is a character string corresponding to a license plate to be checked;
the first comparison module is used for comparing the length of the target segmentation character string with the length of the segmentation character string to be verified to obtain a first comparison result, and determining a deviation comparison mode according to the first comparison result;
the comparison position setting module is used for determining a first target comparison position from the target segmentation character string and determining a second target comparison position from the segmentation character string to be verified;
the second comparison module is used for comparing the characters at the first target comparison position with the characters at the second target comparison position to obtain a second comparison result;
a first updating module, configured to update the first target comparison position and the second target comparison position according to a preset sequential comparison manner when the second comparison result is equal and the first target comparison position is not the last position, and return to perform the step of comparing the characters at the first target comparison position with the characters at the second target comparison position to obtain a second comparison result;
a second updating module, configured to update the first target comparison position and the second target comparison position according to the deviation comparison manner when the second comparison result is unequal and the first target comparison position is not the last position, add one to the number of character verification errors, and return to the step of performing the comparison between the characters at the first target comparison position and the characters at the second target comparison position to obtain a second comparison result;
the adjusting module is used for adjusting the number of the character verification errors according to a second comparison result of the last position when the first target comparison position is the last position;
and the third comparison module is used for comparing the number of the character verification errors with a preset number of allowed error verifications, and if the number of the character verification errors is not more than the preset number of allowed error verifications, the verification is successful.
7. The license plate verification device of claim 6, further comprising:
the second acquisition module is used for acquiring a license plate verification request, wherein the license plate verification request comprises a target license plate and a license plate to be verified;
and the character segmentation module is used for carrying out character segmentation processing on the target license plate and the license plate to be verified to obtain a target segmentation character string and a segmentation character string to be verified.
8. The license plate verification device of claim 6, wherein the first comparison module further comprises:
a first deviation comparison module, configured to, when the first comparison result is that the length of the target segmented character string is equal to the length of the segmented character string to be verified, determine that the deviation comparison mode is a first deviation comparison mode, where the first deviation comparison mode is: and moving the first target comparison position by one bit towards the target direction, and moving the second target comparison position by one bit towards the target direction.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor when executing the computer program implements the steps of the license plate verification method of any one of claims 1 to 5.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the license plate verification method according to any one of claims 1 to 5.
CN202010119428.3A 2020-02-26 2020-02-26 License plate checking method and device, computer equipment and storage medium Pending CN111428708A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010119428.3A CN111428708A (en) 2020-02-26 2020-02-26 License plate checking method and device, computer equipment and storage medium
PCT/CN2021/070584 WO2021169619A1 (en) 2020-02-26 2021-01-07 License plate verification method and apparatus, and computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010119428.3A CN111428708A (en) 2020-02-26 2020-02-26 License plate checking method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111428708A true CN111428708A (en) 2020-07-17

Family

ID=71547235

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010119428.3A Pending CN111428708A (en) 2020-02-26 2020-02-26 License plate checking method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN111428708A (en)
WO (1) WO2021169619A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021169619A1 (en) * 2020-02-26 2021-09-02 深圳壹账通智能科技有限公司 License plate verification method and apparatus, and computer device and storage medium
CN114821829A (en) * 2022-06-23 2022-07-29 成都宜泊信息科技有限公司 Method and device for preventing wrong payment of roadside parking payment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109034158B (en) * 2017-06-09 2021-03-26 杭州海康威视数字技术股份有限公司 License plate recognition method and device and computer equipment
CN109255283B (en) * 2017-07-14 2021-06-04 杭州海康威视数字技术股份有限公司 Multi-frame-based license plate number determination method and device and electronic equipment
CN108416878A (en) * 2018-03-16 2018-08-17 西安艾润物联网技术服务有限责任公司 Car plate method of calibration, device and computer readable storage medium
CN110490186B (en) * 2018-05-15 2022-03-25 杭州海康威视数字技术股份有限公司 License plate recognition method and device and storage medium
CN111428708A (en) * 2020-02-26 2020-07-17 深圳壹账通智能科技有限公司 License plate checking method and device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021169619A1 (en) * 2020-02-26 2021-09-02 深圳壹账通智能科技有限公司 License plate verification method and apparatus, and computer device and storage medium
CN114821829A (en) * 2022-06-23 2022-07-29 成都宜泊信息科技有限公司 Method and device for preventing wrong payment of roadside parking payment

Also Published As

Publication number Publication date
WO2021169619A1 (en) 2021-09-02

Similar Documents

Publication Publication Date Title
US9928401B2 (en) System and method of biometric enrollment and verification
CN110377454B (en) Data verification method and device, computer equipment and storage medium
US11062120B2 (en) High speed reference point independent database filtering for fingerprint identification
CN111428708A (en) License plate checking method and device, computer equipment and storage medium
CN110458184B (en) Optical character recognition assistance method, device, computer equipment and storage medium
CN110555769A (en) Block chain transaction data processing method and device, computer equipment and storage medium
WO2022134828A1 (en) Intelligent warehousing method and system based on picture recognition, and device and storage medium
CN115527244B (en) Fingerprint image matching method and device, computer equipment and storage medium
CN112162924A (en) Interface automation test method and device, computer equipment and storage medium
KR102170930B1 (en) Car damage picture angle correction method, electronic device and readable storage medium
CN109166151B (en) Remote calibration method and device of panoramic camera, computer equipment and storage medium
CN112163110B (en) Image classification method and device, electronic equipment and computer-readable storage medium
JP2875053B2 (en) How to update registered fingerprint feature points
CN112241705A (en) Target detection model training method and target detection method based on classification regression
CN112286780B (en) Method, device, equipment and storage medium for testing recognition algorithm
CN111931672A (en) Handwriting recognition method and device, computer equipment and storage medium
CN110990815A (en) Identity verification method and device
CN112363929B (en) System online method and device, computer equipment and storage medium
CN112115449B (en) Chip physical fingerprint reliability assessment method, device, equipment and medium
CN111191062B (en) Picture processing method, device, computer equipment and storage medium
CN113779620A (en) Program file checking method and device, storage medium and computer equipment
CN111988336A (en) Access request processing method, device and system and computer equipment
CN109543363B (en) Electronic device and software updating and registration template generating method
CN115706795A (en) Camera focusing precision checking method and device, computer equipment and storage medium
CN113836012B (en) Algorithm testing method and device, electronic equipment and storage medium

Legal Events

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