CN107862345B - License plate comparison method and device - Google Patents
License plate comparison method and device Download PDFInfo
- Publication number
- CN107862345B CN107862345B CN201711248287.XA CN201711248287A CN107862345B CN 107862345 B CN107862345 B CN 107862345B CN 201711248287 A CN201711248287 A CN 201711248287A CN 107862345 B CN107862345 B CN 107862345B
- Authority
- CN
- China
- Prior art keywords
- license plate
- perspective transformation
- entrance
- exit
- acquiring
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/75—Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
- G06V10/757—Matching configurations of points or features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/148—Segmentation of character regions
- G06V30/153—Segmentation of character regions using recognition of characters or words
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/62—Text, e.g. of license plates, overlay texts or captions on TV images
- G06V20/625—License plates
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Image Analysis (AREA)
Abstract
The invention provides a license plate comparison method, which comprises the following steps: respectively acquiring feature points of an entrance license plate area and an exit license plate area by adopting a feature extraction method based on angular point detection; acquiring matching points by adopting a characteristic point matching algorithm; acquiring the position of each character in an exit license plate area, carrying out character segmentation on the exit license plate area, and calculating a gradient map of the segmented exit license plate area; acquiring optimal perspective transformation parameters, acquiring a perspective transformation image of an entrance license plate, acquiring a blocked entrance license plate perspective transformation image, and calculating a gradient image of the blocked entrance license plate perspective transformation image; and calculating the correlation coefficient of the gradient map of the outlet license plate area of each block and the gradient map of the inlet license plate perspective transformation map of each block, and calculating the accumulated value of all the block correlation coefficients as the compared score value and outputting the score value. Compared with the prior art, the method can effectively realize comparison of stained, fuzzy, shielded and other license plates.
Description
Technical Field
The invention relates to image processing, video monitoring and security protection, in particular to a license plate comparison method and device.
Background
With the increasingly modern city, the holding capacity of motor vehicles is continuously increased, and the intelligent traffic system plays an increasingly important role. The license plate comparison technology is an important component of a modern intelligent traffic system and has very wide application.
The existing license plate comparison system can achieve higher recognition rate only under the conditions of proper illumination and clear license plate handwriting, and in an actual scene, the problem of wrong or misplaced license plate character recognition is often caused by the reasons of license plate fouling, imaging blurring, license plate shielding and the like. In order to solve the above problems, a license plate fuzzy comparison method is usually adopted to solve the above problems, however, the existing license plate fuzzy comparison method has a low comparison accuracy, and particularly when similar license plates exist, a comparison error result is easily caused.
In summary, there is a need to provide a method and a device for comparing license plates quickly and accurately.
Disclosure of Invention
In view of the above, the main purpose of the present invention is to quickly implement license plate comparison, which is not affected by license plate contamination, imaging blur, license plate occlusion, etc., and has high comparison accuracy.
To achieve the above object, according to a first aspect of the present invention, there is provided a license plate comparison method, including:
the method comprises the steps of firstly, acquiring a license plate region image of an entrance, and acquiring feature points of the entrance license plate region by adopting a feature extraction method based on angular point detection;
secondly, acquiring a license plate region image of an exit, and acquiring feature points of the license plate region of the exit by adopting a feature extraction method based on angular point detection;
thirdly, acquiring characteristic points of an entrance license plate region matched with the characteristic points of an exit license plate region by adopting a characteristic point matching algorithm;
step four, acquiring the position of each character in the exit license plate area, partitioning the characters in the exit license plate area, and calculating a gradient map of the partitioned exit license plate area;
fifthly, acquiring optimal perspective transformation parameters according to the matched feature points, acquiring a perspective transformation image of the entrance license plate according to the optimal perspective transformation parameters, acquiring blocked entrance license plate perspective transformation images according to the positions of characters in an exit license plate area, and calculating a gradient image of the blocked entrance license plate perspective transformation images; and
and a sixth step of calculating the correlation coefficient of the gradient map of the exit license plate region of each block and the gradient map of the entrance license plate perspective transformation map of each block respectively, and calculating the accumulated value of all the block correlation coefficients as the score for comparing the exit license plate region image with the entrance license plate region image and outputting the score.
The license plate region image of the entrance in the first step and the license plate region image of the exit in the second step are obtained by: and acquiring a scene image at an entrance or an exit, and extracting a license plate region image from the scene image acquired at the entrance or the exit.
Further, the feature extraction method based on corner detection in the first step and the second step includes: extracting angular points from the license plate region image by adopting an angular point detection method; and selecting feature points from the extracted corner points by using a feature descriptor.
Further, the corner point detection method includes, but is not limited to: FAST corner detection method, Harris corner detection method, Kitchen-Rosenfeld corner detection method, KLT corner detection method, SUSAN corner detection method, etc.
Further, the feature descriptors include, but are not limited to: ORB feature descriptors, SIFT feature descriptors, SURF feature descriptors, BRIEF feature descriptors, etc.
The feature point matching algorithm in the third step includes, but is not limited to: euclidean distance, Hamming distance, etc.
Further, the fourth step includes:
an exit license plate character blocking step, namely acquiring the position of each character in an exit license plate area by adopting a character segmentation method, blocking the exit license plate area according to the position of each character, and acquiring blocked exit license plate areas;
and a step of calculating the gradient of the outlet license plate region of each block, namely calculating the gradient map of the outlet license plate region of each block.
Further, a first embodiment of the fifth step comprises:
optimal perspective transformation parameter acquisition stepRandomly selecting 4 matching points as the ith group of perspective transformation points PiObtaining the corresponding perspective transformation parameter AiThen, the perspective transformation parameters are verified by all the matching points, and the SUM which is in accordance with the quantity of the perspective transformation parameters is countediSelecting SUMiPerspective transformation parameter A with maximum valueiAs the optimal perspective transformation parameter;
an entrance license plate perspective transformation image acquisition step, wherein perspective transformation processing is carried out on an entrance license plate region image according to the optimal perspective transformation parameters, and a perspective transformation image of an entrance license plate is acquired;
the entrance license plate perspective transformation image is partitioned, the entrance license plate perspective transformation image is partitioned according to the position of each character, and partitioned entrance license plate perspective transformation images are obtained;
and a step of calculating the gradient of the block entrance license plate perspective transformation map, namely calculating the gradient of the entrance license plate perspective transformation map of each block.
Further, a second embodiment of the fifth step comprises:
obtaining the optimal perspective transformation parameters of the blocks, and randomly selecting 4 matching points as a kth group of perspective transformation points P for the exit license plate area of the jth blockjkObtaining the corresponding perspective transformation parameter AjkThen, the perspective transformation parameters are verified by all the matching points, and the SUM which is in accordance with the quantity of the perspective transformation parameters is countedjkSelecting SUMjkPerspective transformation parameter A with maximum valuejkJ = {1,2, …, BNum }, where BNum is the number of characters, as an optimal perspective transformation parameter for the jth block;
an entrance license plate region blocking step, namely acquiring an entrance license plate region of a jth block according to a matching point in an exit license plate region of the jth block;
a step of obtaining a block entrance license plate perspective transformation image, which is to perform perspective transformation processing on an entrance license plate area of a jth block according to the jth block optimal perspective transformation parameter to obtain a perspective transformation image of the jth block entrance license plate;
and a step of calculating the gradient of the block entrance license plate perspective transformation map, namely calculating the gradient of the entrance license plate perspective transformation map of each block.
According to another aspect of the present invention, there is provided a license plate comparison apparatus, including:
the entrance license plate feature point acquisition module is used for acquiring an entrance license plate region image and acquiring feature points of an entrance license plate region by adopting a feature extraction module based on angular point detection;
the exit license plate feature point acquisition module is used for acquiring an exit license plate region image and acquiring feature points of the exit license plate region by adopting a feature extraction module based on angular point detection;
the characteristic point matching module is used for acquiring characteristic points of the entrance license plate region matched with the characteristic points of the exit license plate region by adopting a characteristic point matching algorithm;
the block outlet license plate gradient image acquisition module is used for acquiring the position of each character in an outlet license plate area, carrying out character block on the outlet license plate area and calculating a gradient image of the blocked outlet license plate area;
the blocked entrance license plate gradient map acquisition module is used for acquiring optimal perspective transformation parameters according to the matched characteristic points, acquiring a perspective transformation map of an entrance license plate according to the optimal perspective transformation parameters, acquiring a blocked entrance license plate perspective transformation map according to the positions of characters in an exit license plate area, and calculating a gradient map of the blocked entrance license plate perspective transformation map; and
and the comparison score value calculation module is used for calculating the correlation coefficient of the gradient map of the exit license plate region of each block and the gradient map of the entrance license plate perspective transformation map of each block respectively, calculating the accumulated value of all the block correlation coefficients as the score value for comparing the exit license plate region image with the entrance license plate region image and outputting the score value.
Further, the feature extraction module based on corner detection in the entrance license plate feature point acquisition module and the exit license plate feature point acquisition module includes: the method comprises the steps of extracting angular points from a license plate region image by adopting an angular point detection method; and selecting feature points from the extracted corner points by using a feature descriptor.
Further, the block exit license plate gradient map acquisition module comprises:
the exit license plate character blocking module is used for acquiring the position of each character in an exit license plate area by adopting a character segmentation method, blocking the exit license plate area according to the position of each character and acquiring the blocked exit license plate area;
and the block outlet license plate region gradient calculation module is used for calculating a gradient map of an outlet license plate region of each block respectively.
Further, the first embodiment of the block entrance license plate gradient map acquisition module includes:
an optimal perspective transformation parameter acquisition module for randomly selecting 4 matching points as the ith group of perspective transformation points PiObtaining the corresponding perspective transformation parameter AiThen, the perspective transformation parameters are verified by all the matching points, and the SUM which is in accordance with the quantity of the perspective transformation parameters is countediSelecting SUMiPerspective transformation parameter A with maximum valueiAs the optimal perspective transformation parameter;
the entrance license plate perspective transformation image acquisition module is used for carrying out perspective transformation processing on the entrance license plate region image according to the optimal perspective transformation parameters to acquire a perspective transformation image of the entrance license plate;
the entrance license plate perspective transformation image blocking module is used for blocking the entrance license plate perspective transformation image according to the position of each character to obtain a blocked entrance license plate perspective transformation image;
and the gradient calculation module is used for calculating the gradient map of the inlet license plate perspective transformation map of each block respectively.
Further, the second embodiment of the block entrance license plate gradient map acquisition module includes:
a block optimal perspective transformation parameter acquisition module for randomly selecting 4 matching points as a kth group of perspective transformation points P for the exit license plate area of the jth blockjkObtaining the corresponding perspective transformation parameter AjkThen, all the matching points are used for verifying the perspective transformation parameters, and statistics of the parameters conforming to the perspective transformation parameters are carried outNumber of SUMjkSelecting SUMjkPerspective transformation parameter A with maximum valuejkJ = {1,2, …, BNum }, where BNum is the number of characters, as an optimal perspective transformation parameter for the jth block;
the entrance license plate region blocking module is used for acquiring an entrance license plate region of the jth block according to the matching point in the exit license plate region of the jth block;
the block entrance license plate perspective transformation image acquisition module is used for carrying out perspective transformation processing on an entrance license plate area of the jth block according to the jth block optimal perspective transformation parameter to acquire a perspective transformation image of the jth block entrance license plate;
and the gradient calculation module is used for calculating the gradient map of the inlet license plate perspective transformation map of each block respectively.
Compared with the existing license plate comparison technology, the license plate comparison method can acquire stable characteristic points through angular point detection and characteristic point descriptors on one hand, and on the other hand, the entrance license plate is subjected to perspective transformation processing before scoring calculation, so that the license plate comparison accuracy is improved, and comparison of stained license plates, shielded license plates and fuzzy license plates can be effectively realized.
Drawings
Fig. 1 shows a flowchart of a license plate comparison method according to the present invention.
Fig. 2 is a frame diagram of a license plate comparison apparatus according to the present invention.
Detailed Description
To further clarify the structure, features and other objects of the present invention, a detailed description of the preferred embodiments will be given below with reference to the accompanying drawings, which are provided for illustration of the technical solution of the present invention and are not intended to limit the present invention.
Fig. 1 shows a flowchart of a license plate comparison method according to the present invention. As shown in fig. 1, a license plate comparison method according to the present invention includes:
the method comprises the following steps that S1, a license plate region image of an entrance is obtained, and feature points of the license plate region of the entrance are obtained by adopting a feature extraction method based on corner detection;
a second step S2, acquiring an image of the license plate area at the exit, and acquiring feature points of the license plate area at the exit by adopting a feature extraction method based on angular point detection;
a third step S3 of obtaining the feature points of the entrance license plate area matched with the feature points of the exit license plate area by adopting a feature point matching algorithm;
a fourth step S4, acquiring the position of each character in the exit license plate area, partitioning the characters in the exit license plate area, and calculating a gradient map of the partitioned exit license plate area;
a fifth step S5, acquiring optimal perspective transformation parameters according to the matched feature points, acquiring a perspective transformation image of the entrance license plate according to the optimal perspective transformation parameters, acquiring blocked entrance license plate perspective transformation images according to the positions of characters in the exit license plate area, and calculating a gradient image of the blocked entrance license plate perspective transformation images; and
and a sixth step S6 of respectively calculating the correlation coefficient of the gradient map of the exit license plate region of each block and the gradient map of the entrance license plate perspective transformation map of each block, and calculating the accumulated value of all the block correlation coefficients as the score for comparing the exit license plate region image with the entrance license plate region image and outputting the score.
The acquiring of the license plate region image of the entrance in the first step S1 and the acquiring of the license plate region image of the exit in the second step S2 are: the method comprises the steps of collecting scene images at an entrance or an exit, extracting license plate region images from the scene images collected at the entrance or the exit, and realizing the license plate region images by the conventional license plate snapshot method or equipment, license plate positioning method or device, or license plate detection method or equipment.
In the embodiment, license plate snapshot equipment is respectively arranged at an entrance and an exit of a parking lot, and license plate area images at the entrance and the exit are respectively obtained.
Further, the feature extraction method based on corner detection in the first step S1 and the second step S2 includes: extracting angular points from the license plate region image by adopting an angular point detection method; and selecting feature points from the extracted corner points by using a feature descriptor.
Further, the corner point detection method includes, but is not limited to: FAST corner detection method, Harris corner detection method, Kitchen-Rosenfeld corner detection method, KLT corner detection method, SUSAN corner detection method, etc.
Further, the feature descriptors include, but are not limited to: ORB feature descriptors, SIFT feature descriptors, SURF feature descriptors, BRIEF feature descriptors, etc.
The embodiment adopts the technical scheme that FAST corner detection method is adopted to respectively extract corners of An entrance license plate region and An exit license plate region from An entrance license plate region image and An exit license plate region image by adopting E Ruble, V Rabaud, K Konolige, G Bradski.ORB, and An effective statistical nature to SIFT or SURF. IEEE International Conference on Computer Vision,2012,58(11): 2564-; and then selecting inlet license plate region characteristic points and outlet license plate region characteristic points from the corner points of the inlet license plate region and the corner points of the outlet license plate region respectively by adopting BRIEF characteristic descriptors.
The feature point matching algorithm in the third step S3 includes, but is not limited to: euclidean distance, Hamming distance, etc. In the embodiment, a Hamming distance calculation formula is adopted to calculate the Hamming distances between the characteristic points of the exit license plate region and the characteristic points of the entrance license plate region respectively, and the characteristic points of the entrance license plate region matched with the characteristic points of the exit license plate region are found according to the calculated Hamming distances.
Further, the fourth step S4 includes:
an exit license plate character blocking step S41, adopting a character segmentation method to obtain the position of each character in an exit license plate area, and blocking the exit license plate area according to the position of each character to obtain blocked exit license plate areas;
and a step S42 of calculating the gradient of the outlet license plate areas of the blocks, which is to calculate the gradient map of the outlet license plate areas of each block respectively.
The character segmentation method can be realized by the existing character segmentation technology or character recognition technology. Example "Zhongjing Chaoji, Chenfeng, Chen is many, Wangjiajie. research and implementation of segmentation of license plate characters" [ computer engineering ], 2006,32(5): 238-.
Further, the first embodiment of the fifth step S5 includes:
an optimal perspective transformation parameter obtaining step S51, selecting 4 matching points as the ith group of perspective transformation points PiObtaining the corresponding perspective transformation parameter AiThen, the perspective transformation parameters are verified by all the matching points, and the SUM which is in accordance with the quantity of the perspective transformation parameters is countediSelecting SUMiPerspective transformation parameter A with maximum valueiAs the optimal perspective transformation parameter;
an entrance license plate perspective transformation image obtaining step S52, wherein perspective transformation processing is carried out on the entrance license plate region image according to the optimal perspective transformation parameters, and a perspective transformation image of the entrance license plate is obtained;
an entrance license plate perspective transformation image blocking step S53, wherein the entrance license plate perspective transformation image is blocked according to the position of each character, and blocked entrance license plate perspective transformation images are obtained;
and a step S54 of calculating the gradient of the block entrance license plate perspective transformation map, wherein the step S54 is used for calculating the gradient of the entrance license plate perspective transformation map of each block.
Further, the step S53 of blocking the entrance license plate perspective transformation map is: and for the position of the jth character, partitioning the entry license plate perspective transformation image to obtain the entry license plate perspective transformation image of the jth partition, wherein j is {1,2, …, BNum }, and BNum is the number of the characters.
Further, the second embodiment of the fifth step S5 includes:
a step S501 of obtaining the optimal block perspective transformation parameters, wherein 4 matching points are randomly selected as a kth group of perspective transformation points P for the exit license plate area of the jth blockjkObtaining the corresponding perspective transformation parameter AjkThen, the perspective transformation parameters are verified by all the matching points, and the SUM which is in accordance with the quantity of the perspective transformation parameters is countedjkSelecting SUMjkPerspective transformation parameter A with maximum valuejkAs the optimal perspective transformation parameter of the jth block, j ═ 1,2, …, BNum }, where BNum is the number of characters;
an entrance license plate region blocking step S502, wherein an entrance license plate region of the jth block is obtained according to the matching point in the exit license plate region of the jth block;
a step S503 of obtaining a block entrance license plate perspective transformation image, wherein the perspective transformation processing is carried out on the entrance license plate area of the jth block according to the jth block optimal perspective transformation parameter, and the perspective transformation image of the jth block entrance license plate is obtained;
and a step S504 of calculating the gradient of the block entrance license plate perspective transformation image, wherein the gradient of the entrance license plate perspective transformation image of each block is calculated respectively.
The sixth step S6 includes: and respectively calculating the correlation coefficient of the gradient map of the exit license plate region of the jth block and the gradient map of the perspective transformation map of the entrance license plate region, and calculating the accumulated value of the correlation coefficients of all the blocks as the score for comparing the exit license plate region image with the entrance license plate region image and outputting the score.
Fig. 2 is a frame diagram of a license plate comparison apparatus according to the present invention. As shown in fig. 2, a license plate comparison apparatus according to the present invention includes:
the entrance license plate feature point acquisition module 1 is used for acquiring an entrance license plate region image and acquiring feature points of an entrance license plate region by adopting a feature extraction module based on angular point detection;
the exit license plate feature point acquisition module 2 is used for acquiring an exit license plate region image and acquiring feature points of the exit license plate region by adopting a feature extraction module based on angular point detection;
the characteristic point matching module 3 is used for acquiring characteristic points of an entrance license plate region matched with the characteristic points of an exit license plate region by adopting a characteristic point matching algorithm;
the block outlet license plate gradient map acquisition module 4 is used for acquiring the position of each character in an outlet license plate area, carrying out character block on the outlet license plate area and calculating a gradient map of the blocked outlet license plate area;
the block entrance license plate gradient map acquisition module 5 is used for acquiring optimal perspective transformation parameters according to the matched feature points, acquiring a perspective transformation map of an entrance license plate according to the optimal perspective transformation parameters, acquiring the block entrance license plate perspective transformation map according to the positions of characters in an exit license plate area, and calculating the gradient map of the block entrance license plate perspective transformation map; and
and the comparison score value calculation module 6 is used for calculating the correlation coefficient of the gradient map of the exit license plate region of each block and the gradient map of the entrance license plate perspective transformation map of each block respectively, calculating the accumulated value of all the block correlation coefficients as the score value for comparing the exit license plate region image with the entrance license plate region image and outputting the score value.
The license plate region image of the entrance obtained in the entrance license plate feature point obtaining module 1 and the license plate region image of the exit obtained in the exit license plate feature point obtaining module 2 are used for: the method comprises the steps of collecting scene images at an entrance or an exit, extracting license plate region images from the scene images collected at the entrance or the exit, and realizing the license plate region images by the conventional license plate snapshot method or equipment, license plate positioning method or device, or license plate detection method or equipment.
Further, the feature extraction module based on angular point detection in the entrance license plate feature point acquisition module 1 and the exit license plate feature point acquisition module 2 includes: the method comprises the steps of extracting angular points from a license plate region image by adopting an angular point detection method; and selecting feature points from the extracted corner points by using a feature descriptor.
Further, the corner point detection method includes, but is not limited to: FAST corner detection method, Harris corner detection method, Kitchen-Rosenfeld corner detection method, KLT corner detection method, SUSAN corner detection method, etc.
Further, the feature descriptors include, but are not limited to: ORB feature descriptors, SIFT feature descriptors, SURF feature descriptors, BRIEF feature descriptors, etc.
The feature point matching algorithm in the feature point matching module 3 includes but is not limited to: euclidean distance, Hamming distance, etc.
Further, the block exit license plate gradient map obtaining module 4 includes:
the exit license plate character blocking module 41 is configured to acquire a position of each character in an exit license plate region by using a character segmentation method, block the exit license plate region according to the position of each character, and acquire the blocked exit license plate region;
and the block outlet license plate region gradient calculation module 42 is used for calculating a gradient map of an outlet license plate region of each block respectively.
Further, the first embodiment of the block entrance license plate gradient map obtaining module 5 includes:
an optimal perspective transformation parameter obtaining module 51, configured to randomly select 4 matching points as an i-th set of perspective transformation points PiObtaining the corresponding perspective transformation parameter AiThen, the perspective transformation parameters are verified by all the matching points, and the SUM which is in accordance with the quantity of the perspective transformation parameters is countediSelecting SUMiPerspective transformation parameter A with maximum valueiAs the optimal perspective transformation parameter;
the entrance license plate perspective transformation image acquisition module 52 is used for performing perspective transformation processing on the entrance license plate region image according to the optimal perspective transformation parameters to acquire a perspective transformation image of the entrance license plate;
an entrance license plate perspective transformation image blocking module 53, configured to block the entrance license plate perspective transformation image according to a position of each character, and obtain a blocked entrance license plate perspective transformation image;
and the gradient calculation module 54 of the blocked entrance license plate perspective transformation map is used for calculating the gradient map of the entrance license plate perspective transformation map of each block respectively.
Further, the second embodiment of the block-entrance license plate gradient map obtaining module 5 includes:
a block optimal perspective transformation parameter obtaining module 501, configured to randomly select 4 matching points as a kth group of perspective transformation points P for an exit license plate region of a jth blockjkObtaining the corresponding perspective transformation parameter AjkThen, all the matching points are used for verifying the perspective transformation parameters, and statistics are carried out to accord with the perspectiveNumber of transformation parameters SUMjkSelecting SUMjkPerspective transformation parameter A with maximum valuejkAs the optimal perspective transformation parameter of the jth block, j ═ 1,2, …, BNum }, where BNum is the number of characters;
an entrance license plate region partitioning module 502, configured to obtain an entrance license plate region of a jth partition according to a matching point in an exit license plate region of the jth partition;
a block entrance license plate perspective transformation image obtaining module 503, configured to perform perspective transformation processing on an entrance license plate region of a jth block according to the jth block optimal perspective transformation parameter, and obtain a perspective transformation image of the entrance license plate of the jth block;
and the gradient calculation module 504 of the blocked entrance license plate perspective transformation map is used for calculating the gradient map of the entrance license plate perspective transformation map of each block respectively.
Compared with the existing license plate comparison technology, the license plate comparison method can acquire stable characteristic points through angular point detection and characteristic point descriptors on one hand, and on the other hand, the entrance license plate is subjected to perspective transformation processing before scoring calculation, so that the license plate comparison accuracy is improved, and comparison of stained license plates, shielded license plates and fuzzy license plates can be effectively realized.
While the foregoing is directed to the preferred embodiment of the present invention, and is not intended to limit the scope of the invention, it will be understood that the invention is not limited to the embodiments described herein, which are described to assist those skilled in the art in practicing the invention. Further modifications and improvements may readily occur to those skilled in the art without departing from the spirit and scope of the invention, and it is intended that the invention be limited only by the terms and scope of the appended claims, as including all alternatives and equivalents which may be included within the spirit and scope of the invention as defined by the appended claims.
Claims (14)
1. A license plate comparison method is characterized by comprising the following steps:
the method comprises the steps of firstly, acquiring a license plate region image of an entrance, and acquiring feature points of the entrance license plate region by adopting a feature extraction method based on angular point detection;
secondly, acquiring a license plate region image of an exit, and acquiring feature points of the license plate region of the exit by adopting a feature extraction method based on angular point detection;
thirdly, acquiring characteristic points of an entrance license plate region matched with the characteristic points of an exit license plate region by adopting a characteristic point matching algorithm;
step four, acquiring the position of each character in the exit license plate area, partitioning the characters in the exit license plate area, and calculating a gradient map of the partitioned exit license plate area;
fifthly, acquiring optimal perspective transformation parameters according to the matched feature points, acquiring a perspective transformation image of the entrance license plate according to the optimal perspective transformation parameters, acquiring blocked entrance license plate perspective transformation images according to the positions of characters in an exit license plate area, and calculating a gradient image of the blocked entrance license plate perspective transformation images; and
a sixth step of calculating the correlation coefficients of the gradient map of the exit license plate region of the jth block and the gradient map of the perspective transformation map of the entrance license plate region respectively, and calculating the accumulated value of all the block correlation coefficients as the score for comparing the exit license plate region image with the entrance license plate region image and outputting the score; where j ═ {1,2, …, BNum }, and BNum denotes the number of characters.
2. The method of claim 1, wherein the acquiring of the license plate region image of the entrance in the first step and the acquiring of the license plate region image of the exit in the second step are: and acquiring a scene image at an entrance or an exit, and extracting a license plate region image from the scene image acquired at the entrance or the exit.
3. The method of claim 1, wherein the feature extraction method based on corner detection comprises: extracting angular points from the license plate region image by adopting an angular point detection method; and selecting feature points from the extracted corner points by using a feature descriptor.
4. The method of claim 1, wherein the fourth step comprises:
an exit license plate character blocking step, namely acquiring the position of each character in an exit license plate area by adopting a character segmentation method, blocking the exit license plate area according to the position of each character, and acquiring blocked exit license plate areas; and a step of calculating the gradient of the outlet license plate region of each block, namely calculating the gradient map of the outlet license plate region of each block.
5. The method of claim 1, wherein the fifth step comprises:
obtaining optimal perspective transformation parameters, and randomly selecting 4 matching points as the ith group of perspective transformation points PiObtaining the corresponding perspective transformation parameter AiThen, the perspective transformation parameters are verified by all the matching points, and the SUM which is in accordance with the quantity of the perspective transformation parameters is countediSelecting SUMiPerspective transformation parameter A with maximum valueiAs the optimal perspective transformation parameter;
an entrance license plate perspective transformation image acquisition step, wherein perspective transformation processing is carried out on an entrance license plate region image according to the optimal perspective transformation parameters, and a perspective transformation image of an entrance license plate is acquired;
the entrance license plate perspective transformation image is partitioned, the entrance license plate perspective transformation image is partitioned according to the position of each character, and partitioned entrance license plate perspective transformation images are obtained;
and a step of calculating the gradient of the block entrance license plate perspective transformation map, namely calculating the gradient of the entrance license plate perspective transformation map of each block.
6. The method of claim 1, wherein the fifth step comprises:
obtaining the optimal perspective transformation parameters of the blocks, and randomly selecting 4 matching points as a kth group of perspective transformation points P for the exit license plate area of the jth blockjkObtaining the corresponding perspective transformation parameter AjkThen use all matching pointsVerifying the perspective transformation parameters, and counting the SUM according with the quantity of the perspective transformation parametersjkSelecting SUMjkPerspective transformation parameter A with maximum valuejkAs the optimal perspective transformation parameter of the jth block, j ═ 1,2, …, BNum }, where BNum is the number of characters;
an entrance license plate region blocking step, namely acquiring an entrance license plate region of a jth block according to a matching point in an exit license plate region of the jth block;
a step of obtaining a block entrance license plate perspective transformation image, which is to perform perspective transformation processing on an entrance license plate area of a jth block according to the jth block optimal perspective transformation parameter to obtain a perspective transformation image of the jth block entrance license plate;
and a step of calculating the gradient of the block entrance license plate perspective transformation map, namely calculating the gradient of the entrance license plate perspective transformation map of each block.
7. A method as claimed in claim 3, wherein the corner point detection method includes, but is not limited to: FAST corner detection method, Harris corner detection method, Kitchen-Rosenfeld corner detection method, KLT corner detection method, SUSAN corner detection method.
8. The method of claim 3, wherein the feature descriptors include, but are not limited to: ORB feature descriptor, SIFT feature descriptor, SURF feature descriptor, BRIEF feature descriptor.
9. The method of claim 1, wherein the feature point matching algorithm includes, but is not limited to: euclidean distance, Hamming distance.
10. A license plate comparison device is characterized by comprising:
the entrance license plate feature point acquisition module is used for acquiring an entrance license plate region image and acquiring feature points of an entrance license plate region by adopting a feature extraction module based on angular point detection;
the exit license plate feature point acquisition module is used for acquiring an exit license plate region image and acquiring feature points of the exit license plate region by adopting a feature extraction module based on angular point detection;
the characteristic point matching module is used for acquiring characteristic points of the entrance license plate region matched with the characteristic points of the exit license plate region by adopting a characteristic point matching algorithm;
the block outlet license plate gradient image acquisition module is used for acquiring the position of each character in an outlet license plate area, carrying out character block on the outlet license plate area and calculating a gradient image of the blocked outlet license plate area;
the blocked entrance license plate gradient map acquisition module is used for acquiring optimal perspective transformation parameters according to the matched characteristic points, acquiring a perspective transformation map of an entrance license plate according to the optimal perspective transformation parameters, acquiring a blocked entrance license plate perspective transformation map according to the positions of characters in an exit license plate area, and calculating a gradient map of the blocked entrance license plate perspective transformation map; and
the comparison score value calculation module is used for calculating the correlation coefficients of the gradient map of the exit license plate region of the jth block and the gradient map of the perspective transformation map of the entrance license plate region respectively, calculating the accumulated value of all the block correlation coefficients as the score value for comparing the exit license plate region image with the entrance license plate region image and outputting the score value; where j ═ {1,2, …, BNum }, and BNum denotes the number of characters.
11. The apparatus of claim 10, wherein the feature extraction module based on corner detection in the entrance license plate feature point acquisition module and the exit license plate feature point acquisition module comprises: the method comprises the steps of extracting angular points from a license plate region image by adopting an angular point detection method; and selecting feature points from the extracted corner points by using a feature descriptor.
12. The apparatus of claim 10, wherein the blocked-exit license plate gradient map acquisition module comprises:
the exit license plate character blocking module is used for acquiring the position of each character in an exit license plate area by adopting a character segmentation method, blocking the exit license plate area according to the position of each character and acquiring the blocked exit license plate area;
and the block outlet license plate region gradient calculation module is used for calculating a gradient map of an outlet license plate region of each block respectively.
13. The apparatus of claim 10, wherein the blocked-entry license plate gradient map acquisition module comprises:
an optimal perspective transformation parameter acquisition module for randomly selecting 4 matching points as the ith group of perspective transformation points PiObtaining the corresponding perspective transformation parameter AiThen, the perspective transformation parameters are verified by all the matching points, and the SUM which is in accordance with the quantity of the perspective transformation parameters is countediSelecting SUMiPerspective transformation parameter A with maximum valueiAs the optimal perspective transformation parameter;
the entrance license plate perspective transformation image acquisition module is used for carrying out perspective transformation processing on the entrance license plate region image according to the optimal perspective transformation parameters to acquire a perspective transformation image of the entrance license plate;
the entrance license plate perspective transformation image blocking module is used for blocking the entrance license plate perspective transformation image according to the position of each character to obtain a blocked entrance license plate perspective transformation image;
and the gradient calculation module is used for calculating the gradient map of the inlet license plate perspective transformation map of each block respectively.
14. The apparatus of claim 10, wherein the segmented entrance license plate gradient map acquisition module further comprises:
a block optimal perspective transformation parameter acquisition module for randomly selecting 4 matching points as a kth group of perspective transformation points P for the exit license plate area of the jth blockjkObtaining the corresponding perspective transformation parameter AjkThen, the perspective transformation parameters are verified by all the matching points, and the SUM which is in accordance with the quantity of the perspective transformation parameters is countedjkSelecting SUMjkPerspective transformation parameter A with maximum valuejkAs the optimal perspective transformation parameter of the jth block, j ═ 1,2, …, BNum }, where BNum is the number of characters;
the entrance license plate region blocking module is used for acquiring an entrance license plate region of the jth block according to the matching point in the exit license plate region of the jth block;
the block entrance license plate perspective transformation image acquisition module is used for carrying out perspective transformation processing on an entrance license plate area of the jth block according to the jth block optimal perspective transformation parameter to acquire a perspective transformation image of the jth block entrance license plate;
and the gradient calculation module is used for calculating the gradient map of the inlet license plate perspective transformation map of each block respectively.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711248287.XA CN107862345B (en) | 2017-12-01 | 2017-12-01 | License plate comparison method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711248287.XA CN107862345B (en) | 2017-12-01 | 2017-12-01 | License plate comparison method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107862345A CN107862345A (en) | 2018-03-30 |
CN107862345B true CN107862345B (en) | 2020-05-08 |
Family
ID=61704516
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711248287.XA Active CN107862345B (en) | 2017-12-01 | 2017-12-01 | License plate comparison method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107862345B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103065135A (en) * | 2013-01-25 | 2013-04-24 | 上海理工大学 | License number matching algorithm based on digital image processing |
CN104346605A (en) * | 2013-08-01 | 2015-02-11 | 株式会社电装 | Number plate recognition device and number plate recognition method |
CN104376332A (en) * | 2014-12-09 | 2015-02-25 | 深圳市捷顺科技实业股份有限公司 | License plate recognition method and device |
CN105574944A (en) * | 2015-12-15 | 2016-05-11 | 重庆凯泽科技有限公司 | Highway intelligent toll collection system based on vehicle identification and method thereof |
CN106778510A (en) * | 2016-11-25 | 2017-05-31 | 江西师范大学 | A kind of ultra high resolution remote sensing images middle-high building characteristic point matching method |
CN106845508A (en) * | 2015-12-07 | 2017-06-13 | 腾讯科技(深圳)有限公司 | The methods, devices and systems of release in a kind of detection image |
CN106934396A (en) * | 2017-03-09 | 2017-07-07 | 深圳市捷顺科技实业股份有限公司 | A kind of license number search method and system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130163822A1 (en) * | 2006-04-04 | 2013-06-27 | Cyclops Technologies, Inc. | Airborne Image Capture and Recognition System |
-
2017
- 2017-12-01 CN CN201711248287.XA patent/CN107862345B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103065135A (en) * | 2013-01-25 | 2013-04-24 | 上海理工大学 | License number matching algorithm based on digital image processing |
CN104346605A (en) * | 2013-08-01 | 2015-02-11 | 株式会社电装 | Number plate recognition device and number plate recognition method |
CN104376332A (en) * | 2014-12-09 | 2015-02-25 | 深圳市捷顺科技实业股份有限公司 | License plate recognition method and device |
CN106845508A (en) * | 2015-12-07 | 2017-06-13 | 腾讯科技(深圳)有限公司 | The methods, devices and systems of release in a kind of detection image |
CN105574944A (en) * | 2015-12-15 | 2016-05-11 | 重庆凯泽科技有限公司 | Highway intelligent toll collection system based on vehicle identification and method thereof |
CN106778510A (en) * | 2016-11-25 | 2017-05-31 | 江西师范大学 | A kind of ultra high resolution remote sensing images middle-high building characteristic point matching method |
CN106934396A (en) * | 2017-03-09 | 2017-07-07 | 深圳市捷顺科技实业股份有限公司 | A kind of license number search method and system |
Non-Patent Citations (2)
Title |
---|
Automatic license plate recognition: A comparative study;Imran Shafiq Ahmad,et al.;《2015 IEEE International Symposium on Signal Processing and Information Technology (ISSPIT)》;20160201;第635-640页 * |
基于模板匹配和局部HOG特征的车牌识别算法;高聪等;《计算机系统应用》;20170131;第26卷(第1期);第122-128页 * |
Also Published As
Publication number | Publication date |
---|---|
CN107862345A (en) | 2018-03-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108960211B (en) | Multi-target human body posture detection method and system | |
CN108052931B (en) | License plate recognition result fusion method and device | |
CN111145223A (en) | Multi-camera personnel behavior track identification analysis method | |
CN104376575A (en) | Pedestrian counting method and device based on monitoring of multiple cameras | |
Tarabek | Fast license plate detection based on edge density and integral edge image | |
CN113191180A (en) | Target tracking method and device, electronic equipment and storage medium | |
Li et al. | Rotation correction for license plate recognition | |
CN109460722A (en) | A kind of license plate intelligent identification Method | |
CN112991374A (en) | Canny algorithm-based edge enhancement method, device, equipment and storage medium | |
CN110675442A (en) | Local stereo matching method and system combined with target identification technology | |
Roomi et al. | Accurate license plate localization | |
Aarthi et al. | Vehicle detection in static images using color and corner map | |
CN105046191A (en) | Texture image identifying method | |
CN106778675B (en) | A kind of recognition methods of target in video image object and device | |
CN107862345B (en) | License plate comparison method and device | |
Zhong et al. | A new image-based algorithm for icing detection and icing thickness estimation for transmission lines | |
CN116330658B (en) | Target tracking method, device and system based on depth image and image pickup equipment | |
CN104408430B (en) | License plate positioning method and device | |
CN110363192A (en) | Object image identification system and object image discrimination method | |
CN115131725A (en) | Traffic flow statistical method, device, equipment and storage medium | |
Sudheer et al. | Vehicle Number Identification and Logging System Using Optical Character Recognition | |
Raj et al. | Semi-Geometrical approach to estimate the speed of the vehicle through a surveillance video stream | |
CN109886120B (en) | Zebra crossing detection method and system | |
Bodade et al. | A novel approach for automated skew correction of vehicle number plate using principal component analysis | |
CN113989325A (en) | Multi-target matching algorithm based on matrix maximum number |
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 |