WO2018219054A1 - Method, device, and system for license plate recognition - Google Patents

Method, device, and system for license plate recognition Download PDF

Info

Publication number
WO2018219054A1
WO2018219054A1 PCT/CN2018/083385 CN2018083385W WO2018219054A1 WO 2018219054 A1 WO2018219054 A1 WO 2018219054A1 CN 2018083385 W CN2018083385 W CN 2018083385W WO 2018219054 A1 WO2018219054 A1 WO 2018219054A1
Authority
WO
WIPO (PCT)
Prior art keywords
license plate
plate image
character
image
mser
Prior art date
Application number
PCT/CN2018/083385
Other languages
French (fr)
Chinese (zh)
Inventor
韦立庆
薛睿
钮毅
罗兵华
Original Assignee
杭州海康威视数字技术股份有限公司
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 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Publication of WO2018219054A1 publication Critical patent/WO2018219054A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
    • G06V20/584Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads of vehicle lights or traffic lights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • G06V10/242Aligning, centring, orientation detection or correction of the image by image rotation, e.g. by 90 degrees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • 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/146Aligning or centring of the image pick-up or image-field
    • G06V30/1475Inclination or skew detection or correction of characters or of image to be recognised
    • G06V30/1478Inclination or skew detection or correction of characters or of image to be recognised of characters or characters lines
    • 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
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/017Detecting movement of traffic to be counted or controlled identifying vehicles
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/017Detecting movement of traffic to be counted or controlled identifying vehicles
    • G08G1/0175Detecting movement of traffic to be counted or controlled identifying vehicles by photographing vehicles, e.g. when violating traffic rules
    • 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

Definitions

  • the present application relates to the field of intelligent transportation technologies, and in particular, to a license plate recognition method, device and system.
  • License plate recognition technology is an application of computer video image recognition technology in vehicle license plate recognition.
  • the license plate recognition technology requires that the license plate can be extracted and recognized from the complex background, and the vehicle license number can be identified through techniques such as license plate extraction, image preprocessing, feature extraction, and license plate character recognition. Therefore, the license plate recognition technology has been widely used in scenes such as bayonet, parking lot and electronic police to obtain the brand information of vehicles in the scene, and plays an important role in many aspects such as public security management.
  • the captured license plate image When the camera is shooting an image, the captured license plate image may be tilted due to the shooting angle problem.
  • the corresponding license plate recognition method by rotating the pre-processed image by n degrees in clockwise and counterclockwise directions, each rotation by 1 degree, obtains 2n rotated images, and statistically calculates the horizontal differential projection of each rotated image. The horizontal difference value is obtained, and then the horizontal difference mean value is calculated, and the non-tilted image in which the horizontal difference mean value is selected among the 2n+1 rotation images is determined, and the license plate in the non-tilted image is finally recognized.
  • the illegal ball is a special ball type camera device for shooting illegal parking applied in the traffic management system, and the tilt of the photographed license plate image 101 is taken.
  • the angle is often large. If the above method is used, the value of n needs to be set large, which increases the time consumption of the system operation and reduces the operation efficiency. Moreover, since the angle of the shooting is too large, the acquired license plate image will be deformed, resulting in a high probability of failure in license plate recognition.
  • the purpose of the embodiment of the present application is to provide a license plate recognition method, device and system to improve the operation efficiency and success rate of license plate recognition.
  • the specific technical solutions are as follows:
  • an embodiment of the present application provides a license plate recognition method, where the method includes:
  • the characters in the collected license plate image are detected by a preset image segmentation algorithm to determine the position of each character in the license plate image;
  • Each character in the converted license plate image is identified to obtain a recognized license plate.
  • the preset image segmentation algorithm comprises: a maximum stable extreme value region MSER image segmentation algorithm
  • the determining, by using a preset image segmentation algorithm, the characters in the collected license plate image to determine the position of each character in the license plate image including:
  • the MSER image segmentation algorithm is used to detect characters in the collected license plate image to obtain the MSER frame position of each character;
  • the position of the MSER box of each character is determined as the position of the corresponding character.
  • determining, according to a position of each character in the license plate image, a range of tilt angles of the license plate image including:
  • the performing the rotation correction on the license plate image according to the tilt angle range to obtain a corrected license plate image includes:
  • the acquiring the coordinates of the vertex of the corrected license plate image, transforming the coordinates of the vertex by perspective transformation, and obtaining a converted license plate image with the same character height including:
  • a converted license plate image is obtained based on the mapping relationship and the corrected license plate image.
  • the identifying each character in the converted license plate image to obtain the recognized license plate includes:
  • the characters in each position are respectively input into a preset neural network for template matching, and the template matching confidence of each character is obtained;
  • the template matching confidence of each character is compared with the MSER result confidence of the MSER frame position corresponding to the character, and when the MSER result confidence is greater than the template matching confidence, the character of the location is updated to be the MSER result.
  • the updated converted license plate image is determined to be the recognized license plate.
  • an embodiment of the present application provides a license plate recognition device, where the device includes:
  • a character position determining module configured to detect, by using a preset image segmentation algorithm, characters in the collected license plate image to determine a position of each character in the license plate image;
  • a license plate tilt angle determining module configured to determine a tilt angle range of the license plate image according to a position of each character in the license plate image
  • a license plate rotation correction module configured to perform rotation correction on the license plate image according to the tilt angle range to obtain a corrected license plate image
  • a license plate distortion correction module configured to acquire vertex coordinates of the corrected license plate image, and transform the vertex coordinates by perspective transformation to obtain a converted license plate image with a character contour;
  • the license plate character recognition module is configured to identify each character in the converted license plate image to obtain the recognized license plate.
  • the preset image segmentation algorithm comprises: a maximum stable extreme value region MSER image segmentation algorithm
  • the MSER image segmentation algorithm is used to detect characters in the collected license plate image to obtain the MSER frame position of each character;
  • the position of the MSER box of each character is determined as the position of the corresponding character.
  • the license plate tilt angle determining module is specifically configured to:
  • the license plate rotation correction module is specifically configured to:
  • the license plate distortion correction module is specifically configured to:
  • a converted license plate image is obtained based on the mapping relationship and the corrected license plate image.
  • the license plate character recognition module is specifically configured to:
  • the characters in each position are respectively input into a preset neural network for template matching, and the template matching confidence of each character is obtained;
  • the template matching confidence of each character is compared with the MSER result confidence of the MSER frame position corresponding to the character, and when the MSER result confidence is greater than the template matching confidence, the character of the location is updated to be the MSER result.
  • the updated converted license plate image is determined to be the recognized license plate.
  • an embodiment of the present application provides a license plate recognition system, where the system includes:
  • An image capture device for photographing a vehicle to obtain a license plate image
  • a memory for storing a computer program
  • an embodiment of the present application provides a storage medium for storing executable code, where the executable code is used to execute at a runtime: the method steps provided by the first aspect of the embodiment of the present application.
  • an embodiment of the present application provides an application program for performing, at runtime, the method steps provided by the first aspect of the embodiment of the present application.
  • a method, device and system for license plate recognition obtained by an embodiment of the present invention obtain a position of each character in a license plate image by a preset image segmentation algorithm, and determine a range of inclination angles of the license plate image according to the position of each character, according to the The tilt angle range is used to rotate the license plate image, and the coordinate transformation is performed by perspective transformation to obtain the license plate image with the same character height. Finally, each character is identified, thereby reducing the number of images participating in the operation and improving the operation efficiency of the license plate recognition. And through the preset image segmentation algorithm, the accuracy of character segmentation is improved, and the influence of character distortion is effectively solved by perspective transformation, thereby improving the success rate of license plate recognition.
  • FIG. 2 is a schematic flow chart of a license plate recognition method according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a character position detected by an MSER according to an embodiment of the present application.
  • 4a is a license plate image after horizontal tilt correction obtained by rotating after X-direction Radon transform according to an embodiment of the present application
  • 4b is a corrected license plate image corrected by the Radon transform in the Y direction according to an embodiment of the present application
  • FIG. 5a is a schematic diagram of obtaining key points based on character information according to an embodiment of the present application.
  • FIG. 5b is a converted license plate image of a character contour obtained by perspective transformation according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a license plate recognition device according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a license plate recognition system according to an embodiment of the present application.
  • the embodiment of the present application provides a license plate recognition method, device and system.
  • the execution body of the license plate recognition method provided by the embodiment of the present application may be a processor equipped with a core processing chip, for example, a DSP (Digital Signal Processor) and an ARM (Advanced Reduced). Instruction Set Computer Machines, processors of core processing chips such as FPGAs (Field-Programmable Gate Arrays).
  • a manner of implementing a license plate recognition method provided by an embodiment of the present application may be at least one of software, hardware circuits, and logic circuits disposed in an execution body.
  • a license plate recognition method provided by an embodiment of the present application may include the following steps:
  • S201 The preset image segmentation algorithm is used to detect characters in the collected license plate image to determine the position of each character in the license plate image.
  • the image segmentation algorithm may be an edge-based image segmentation algorithm, a region-based image segmentation algorithm, or a texture-based image segmentation algorithm.
  • An appropriate image segmentation algorithm can be selected by the characteristics of the image samples that need to be segmented.
  • the preset image segmentation algorithm includes: an image segmentation algorithm of MSER (Maximally Stable Extremal Regions).
  • MSER Maximum Stable Extremal Regions
  • MSER is considered to be the best performing affine invariant region, and MSER is the most stable region obtained when binarizing images using different gray thresholds.
  • the MSER has the following characteristics: it has invariance to the affine change of the image gray scale; stability, the support set of the region is stable with respect to the gray scale change; and the region of different fineness can be detected.
  • the embodiment of the present application adopts the MESR as a preset image segmentation algorithm.
  • the MSER extraction process includes: binarizing the image using a series of gray thresholds; obtaining a corresponding black region and a white region for each binary image obtained by the threshold; determining a wider gray threshold range Maintain a stable shape inside the area.
  • the preset image segmentation algorithm is used to detect the characters in the license plate image.
  • the actual process is to identify and segment the characters in the license plate image by using a preset image analysis algorithm, thereby identifying the region where each character in the license plate image is located.
  • the position of the area in which each character is located can be determined to determine the position of each character.
  • Other ways of determining the position by the coordinates, the distance, the angle, and the like are all in the protection scope of the embodiment of the present application, and are not described herein again.
  • S201 can be specifically:
  • the MSER image segmentation algorithm is used to detect the characters in the collected license plate image to obtain the position of the MSER frame of each character;
  • the position of the MSER box of each character is determined as the position of the corresponding character.
  • the MSER frame of each character is obtained, and each MSER box contains one character, and then the specific position of each character in the image is determined, which can be determined according to the vertex coordinates of the MSER frame of each character, or according to the MSER The distance from the vertex of the frame to the edge of the image is determined.
  • Other ways of determining the position by the coordinates, the distance, the angle, and the like are all in the protection scope of the embodiment of the present application, and are not described herein again.
  • the tilt angle of the license plate image may be determined according to the position of each character.
  • the tilt angle of the license plate image may be determined according to the coordinates of the center point of each character, or may be based on the area in which each character is located.
  • the vertex coordinates determine the tilt angle of the license plate image, and the tilt angle of the license plate image can also be determined according to a certain corresponding position coordinate of the region in which each character is located, which is a protection range of the embodiment of the present application. Since there is interference during image capturing, there is a certain error between the tilt angle and the actual tilt angle by the above method. Therefore, in order to improve the detection accuracy, a certain deviation can be set based on the tilt angle obtained above.
  • Range to determine the range of tilt angles of the license plate image. For example, if the calculated license plate tilt angle is 29 degrees, a deviation of 3 degrees may be allowed on the basis, and the tilt angle of the license plate image may be greater than or equal to 26 degrees and less than or equal to 32 degrees.
  • S202 can be specifically:
  • the first step determining the coordinates of the center point of each character in the license plate image according to the position of each character in the license plate image;
  • the slope of the license plate image compared to the horizontal direction is determined by a least squares method
  • the third step is to determine an offset angle of the license plate image compared to the horizontal direction according to the slope;
  • the tilt angle range of the license plate image is determined according to the offset angle and the preset search angle range.
  • each The center point coordinates of the character determine the tilt angle. After determining the coordinates of each center point, the slope of all the coordinates of the center point can be obtained, and the slope is calculated to obtain the inclination angle of the line connecting all the coordinates of the center point, that is, the inclination angle of the license plate image.
  • the manner of determining the tilt angle of the information also belongs to the protection scope of the embodiment of the present application, and details are not described herein again.
  • the slope of the connection is determined by the least squares method for the determined central point coordinates, and the least squares method is to find the square of the error by minimizing the error.
  • the best function matching method for data is determined by the least squares method for the determined central point coordinates, and the least squares method is to find the square of the error by minimizing the error.
  • the slope of the line connecting the point coordinates, x is the average of the abscissa of the center point of all characters, b is a constant, and then the slope of the line connecting all the coordinates of the center point is obtained by the inverse trigonometric function arctan(k).
  • the angle of inclination of the license plate image is set based on the obtained tilt angle. For example, if the preset search angle range is set to ⁇ , the tilt angle range of the license plate image is [arctan(k) - ⁇ , arctan(k) + ⁇ ].
  • S203 Perform rotation correction on the license plate image according to the tilt angle range to obtain a corrected license plate image.
  • the license plate image Since the acquired license plate image has a certain inclination angle compared to the horizontal direction, in order to achieve a better recognition effect, the license plate image needs to be rotated to the horizontal direction.
  • the range of the tilt angle of the license plate image can be obtained, that is, the degree of tilt of the license plate image, for example, the license plate image is inclined by 35 degrees compared with the horizontal direction, and the license plate image needs to be rotated by 35 degrees to obtain the corrected license plate image.
  • Rotation correction can be understood as rotating the license plate image according to the range of the tilt angle.
  • the image can be rotated by, for example, Radon transform, which performs the horizontal axis direction and the vertical axis direction, respectively.
  • S203 can be specifically:
  • the Radon transform is performed on the license plate image according to the tilt angle range to obtain the horizontal tilt angle of the license plate image
  • the license plate image is rotated and corrected according to the horizontal tilt angle to obtain the license plate image after the horizontal tilt correction;
  • the Radon transform is performed on the license plate image after the horizontal tilt correction according to the tilt angle range, and the vertical tilt angle of the license plate image after the horizontal tilt correction is obtained;
  • the license plate image corrected by the horizontal tilt is corrected according to the vertical tilt angle to obtain a corrected license plate image.
  • the obtained corrected license plate image not only ensures that the whole is horizontal, but also ensures that each character is also horizontal. Therefore, this embodiment adopts the Radon transform method.
  • the license plate image is rotated for correction.
  • the specific implementation process of the Radon transform is based on the tilt angle range.
  • the Radon transform is performed on the license plate image.
  • the cumulative result of the first derivative is obtained from the Radon transform result. When the sum is maximum, the corresponding value is the license plate.
  • the horizontal tilt angle of the image is corrected horizontally according to the horizontal tilt angle, and the Radon transform is performed on the horizontally corrected image according to the tilt angle range, and the absolute value of the first derivative is added to the Radon transform result.
  • the corresponding value is the vertical tilt angle of the image
  • the horizontally corrected image is corrected in the vertical direction according to the vertical tilt angle to obtain a corrected license plate image
  • the obtained corrected license plate image is a whole. Very positive license plate image.
  • S204 Acquire a vertex coordinate of the corrected license plate image, and transform the vertex coordinates by a perspective transformation to obtain a converted license plate image with the same character height.
  • the embodiment of the present application uses a perspective transformation method to transform the coordinates.
  • the perspective transformation is to project the image to a new view plane, and each coordinate point has a corresponding relationship with the original image in the new view plane.
  • S204 may be specifically:
  • the vertex coordinates of the corrected license plate image are obtained;
  • the vertex coordinates are transformed to obtain vertex transformation coordinates of the character contour
  • the coordinates of the vertex transformation are calculated to obtain a transformation parameter
  • the mapping relationship between the vertex coordinates and the vertex transformation coordinates is obtained;
  • the converted license plate image is obtained according to the mapping relationship and the correction of the license plate image.
  • the general transformation formula of perspective transformation is as shown in (1):
  • x is the abscissa of the vertex in the transformed license plate image
  • y is the ordinate of the vertex in the transformed license plate image
  • u is the abscissa of a vertex in the license plate image
  • v is the ordinate of the vertex in the license plate image
  • a 11 to a 33 are transformation parameters. Therefore, it is known that the four vertices corresponding to the transformation can determine the vertex coordinates of the transformed license plate image. Specifically, the four vertex coordinates of the corrected license plate image can be obtained according to the vertex coordinates of the MSER frame position of the first and last characters.
  • the coordinates of the four vertices of the corrected license plate image be (x0, y0) (x1, y1) (x2, y2) (x3, y3), in order to ensure the contour height of each character of the transformed image, the transformed point
  • the coordinates should be (x0-b, y1)(x1, y1)(x2, y2)(x3-b, y2), where b is the correction value, that is, the adjusted point (xb, y1) and point
  • the abscissas of (x3-b, y2) are equal, and thus the values of a 11 to a 33 are obtained by the general transformation formula (1), thereby obtaining a mapping relationship.
  • BP network is a multi-layer feedforward network trained by error inverse propagation algorithm. It is one of the most widely used neural network models.
  • the BP network has the ability to learn and store a large number of input-output mode mapping relationships without the need to disclose the mathematical equations describing such mapping relationships in advance.
  • S205 can be specifically:
  • the first step using a plurality of preset license plate templates to perform character position matching on the converted license plate image, and determining a position of the character in the converted license plate image that matches the preset license plate template;
  • the characters in each position are respectively input into a preset neural network for template matching, and the template matching confidence of each character is obtained;
  • the template matching confidence of each character is compared with the MSER result confidence of the MSER frame position corresponding to the character, and when the MSER result confidence is greater than the template matching confidence, the character of the position is updated as the MSER result corresponding to the MSER.
  • the updated converted license plate image is the recognized license plate.
  • the method of template matching is to search for a target in a large image. It is known that there are targets to be found in the figure, and the target has the same size, direction and image as the template, and the target can be found in the figure by a certain algorithm. Determine the coordinate position, and determine the template matching confidence of the characters at each position by the neural network identification method. Due to image segmentation, selection, and character recognition, some characters of the license plate image may be distorted, so that the value of the template matching confidence may be lower, wherein the confidence may be a probability value or an evaluation value. The probability value is the probability of which standard character is a character in the license plate image.
  • the evaluation value is a score of which standard character is similar to a character in the license plate image according to the definition, and the score may be a score within 10 minutes. It can be a score within 100 points.
  • the MSER method can obtain the confidence of the MSER result relative to the position of the MSER frame when segmenting the image, that is, the degree to which the standard characters in a certain MSER box are.
  • the result matching confidence of the template matching and the confidence of the MSER result are compared character by character, and the corresponding character position in the converted license plate image is updated by the larger result of the template matching result confidence and the MSER result confidence, in all characters After the identification is completed, it is possible to determine the updated license plate image.
  • a threshold may be set, and the position of the character is updated when the confidence of the MSER result is greater than the threshold of the template.
  • the position of each character in the license plate image is obtained by preset image segmentation algorithm, and the tilt angle range of the license plate image is determined according to the position of each character, and the license plate image is rotated and corrected according to the tilt angle range.
  • the coordinate transformation is carried out to obtain the license plate image with the same character height.
  • the license plate recognition method provided by the embodiment of the present application is introduced below in conjunction with a specific application example.
  • the license plate image collected by the image acquisition device the position of the character detected by the MSER is as shown by the square formed by each character in FIG. 3, and the straight line 301 in FIG. 3 is the license plate.
  • the line connecting the coordinates of the center point of all the characters in the image is obtained by calculating the slope of the line 301 to obtain a tilt angle of the license plate image of 40 degrees, and setting the angle range to be searched to be 15 degrees, and the tilt angle range of the license plate image is 25 Degree to 55 degrees.
  • the tilted license plate is rotated by the X-direction Radon transform, and the rotated license plate image is shown in FIG. 4a, and then the Y-direction Radon transform is performed to correct the rotated license plate image.
  • a corrected license plate image is shown in Figure 4b.
  • the characters in the corrected license plate image obtained after the rotation correction are closer to the image acquisition device side, and the characters away from the image acquisition device side are smaller.
  • the figure is 4b corresponds to the image of the MSER frame position, as shown in Figure 5a, extract the coordinates of points a, b, c, d in the figure, points b, c can be obtained based on the MSER frame position of the last character, points a, d can be based on the first The position of the MSER frame of the character is obtained.
  • the coordinates of the four points a, b, c, and d are respectively (x0, y0) (x1, y1) (x2, y2) (x3, y3), and the coordinates of the points obtained after the transformation are respectively
  • b is a correction value, which can be determined according to the effect of the corrected image that the image is expected to achieve
  • the perspective transformation formula (1) obtains a mapping relationship
  • Fig. 5a is corrected to obtain a converted license plate image of the character contour as shown in Fig. 5b.
  • each character in the converted license plate image of the same character height can be sent to the BP network for recognition, since characters may be distorted during the above transformation process, The way the template matches the results can be corrected by the MSER results.
  • the position of each character in the license plate image is obtained by a preset image segmentation algorithm, and the tilt angle range of the license plate image is determined according to the position of each character, and the license plate is used according to the tilt angle range.
  • the image is rotated and corrected, and the coordinate transformation is performed by perspective transformation to obtain the license plate image with the same character height.
  • each character is recognized, thereby reducing the number of images participating in the operation, improving the operation efficiency of the license plate recognition, and adopting the preset image.
  • the segmentation algorithm improves the accuracy of character segmentation and effectively solves the influence of character distortion through perspective transformation, thereby improving the success rate of license plate recognition.
  • the embodiment of the present application provides a license plate recognition device.
  • the device may include:
  • a character position determining module 610 configured to detect, by using a preset image segmentation algorithm, characters in the collected license plate image to determine a position of each character in the license plate image;
  • a license plate tilt angle determining module 620 configured to determine a tilt angle range of the license plate image according to a position of each character in the license plate image
  • a license plate rotation correction module 630 configured to perform rotation correction on the license plate image according to the tilt angle range to obtain a corrected license plate image
  • a license plate distortion correction module 640 configured to acquire vertex coordinates of the corrected license plate image, and transform the vertex coordinates by perspective transformation to obtain a converted license plate image with a character contour;
  • the license plate character recognition module 650 is configured to identify each character in the converted license plate image to obtain the recognized license plate.
  • the position of each character in the license plate image is obtained by preset image segmentation algorithm, and the tilt angle range of the license plate image is determined according to the position of each character, and the license plate image is rotated and corrected according to the tilt angle range.
  • the coordinate transformation is carried out to obtain the license plate image with the same character height.
  • the preset image segmentation algorithm may include: a maximum stable extreme value region MSER image segmentation algorithm;
  • the character position determining module 610 can be specifically configured to:
  • the MSER image segmentation algorithm is used to detect characters in the collected license plate image to obtain the MSER frame position of each character;
  • the position of the MSER box of each character is determined as the position of the corresponding character.
  • the license plate tilt angle determining module 620 can be specifically configured to:
  • the license plate rotation correction module 630 can be specifically configured to:
  • the license plate distortion correction module 640 can be specifically configured to:
  • a converted license plate image is obtained based on the mapping relationship and the corrected license plate image.
  • the license plate character recognition module 650 is specifically configured to:
  • the characters in each position are respectively input into a preset neural network for template matching, and the template matching confidence of each character is obtained;
  • the template matching confidence of each character is compared with the MSER result confidence of the MSER frame position corresponding to the character, and when the MSER result confidence is greater than the template matching confidence, the character of the location is updated to be the MSER result.
  • the updated converted license plate image is determined to be the recognized license plate.
  • the license plate recognition device of the embodiment of the present application is a device for applying the license plate recognition method, and all the embodiments of the license plate recognition method are applicable to the device, and both can achieve the same or similar beneficial effects.
  • the embodiment of the present application provides a license plate recognition system.
  • the system may include:
  • An image capturing device 710 is configured to capture a vehicle to obtain a license plate image
  • a memory 720 configured to store a computer program
  • the processor 730 is configured to detect, by using a preset image segmentation algorithm, characters in the license plate image collected by the image capturing device 710, and determine a position of each character in the license plate image; according to each of the license plate images a position of the character, determining a range of the tilt angle of the license plate image; performing rotation correction on the license plate image according to the tilt angle range to obtain a corrected license plate image; acquiring vertex coordinates of the corrected license plate image, and performing perspective transformation on the The vertex coordinates are transformed to obtain a converted license plate image having the same character height; each character in the converted license plate image is identified to obtain the recognized license plate.
  • the position of each character in the license plate image is obtained by preset image segmentation algorithm, and the tilt angle range of the license plate image is determined according to the position of each character, and the license plate image is rotated and corrected according to the tilt angle range.
  • the coordinate transformation is carried out to obtain the license plate image with the same character height.
  • the preset image segmentation algorithm comprises: a maximum stable extreme value region MSER image segmentation algorithm
  • the processor 730 can be specifically configured to:
  • the MSER image segmentation algorithm is used to detect characters in the collected license plate image to obtain the MSER frame position of each character;
  • the position of the MSER box of each character is determined as the position of the corresponding character.
  • the processor 730 is specifically configured to:
  • the processor 730 is specifically configured to:
  • the processor 730 is specifically configured to:
  • a converted license plate image is obtained based on the mapping relationship and the corrected license plate image.
  • the processor 730 is specifically configured to:
  • the characters in each position are respectively input into a preset neural network for template matching, and the template matching confidence of each character is obtained;
  • the template matching confidence of each character is compared with the MSER result confidence of the MSER frame position corresponding to the character, and when the MSER result confidence is greater than the template matching confidence, the character of the location is updated to be the MSER result.
  • the updated converted license plate image is determined to be the recognized license plate.
  • the license plate recognition system of the embodiment of the present application is a system for applying the license plate recognition method and device, and all the embodiments of the license plate recognition method and device are applicable to the system, and both can achieve the same or similar beneficial effects.
  • the embodiment of the present application provides a storage medium for storing executable code, which is used for execution at runtime: provided by the embodiment of the present application.
  • a license plate recognition method specifically, the license plate recognition method includes:
  • the characters in the collected license plate image are detected by a preset image segmentation algorithm to determine the position of each character in the license plate image;
  • Each character in the converted license plate image is identified to obtain a recognized license plate.
  • the preset image segmentation algorithm comprises: a maximum stable extreme value region MSER image segmentation algorithm
  • the MSER image segmentation algorithm is used to detect characters in the collected license plate image to obtain the MSER frame position of each character;
  • the position of the MSER box of each character is determined as the position of the corresponding character.
  • determining, according to a position of each character in the license plate image, a range of tilt angles of the license plate image including:
  • the performing the rotation correction on the license plate image according to the tilt angle range to obtain a corrected license plate image includes:
  • the acquiring the coordinates of the vertex of the corrected license plate image, transforming the coordinates of the vertex by perspective transformation, and obtaining a converted license plate image with the same character height including:
  • a converted license plate image is obtained based on the mapping relationship and the corrected license plate image.
  • the identifying each character in the converted license plate image to obtain the recognized license plate includes:
  • the characters in each position are respectively input into a preset neural network for template matching, and the template matching confidence of each character is obtained;
  • the template matching confidence of each character is compared with the MSER result confidence of the MSER frame position corresponding to the character, and when the MSER result confidence is greater than the template matching confidence, the character of the location is updated to be the MSER result.
  • the updated converted license plate image is determined to be the recognized license plate.
  • the storage medium stores an application program that executes the license plate recognition method provided by the embodiment of the present application at runtime, and thus can realize: obtaining a position of each character in the license plate image by using a preset image segmentation algorithm, and according to The position of each character determines the range of the tilt angle of the license plate image, according to the tilt angle range, the license plate image is rotated and corrected, and coordinate transformation is performed through perspective transformation to obtain a license plate image with the same character height, and finally each character is identified.
  • the number of images participating in the operation is reduced, the operation efficiency of the license plate recognition is improved, and the accuracy of the character segmentation is improved by the preset image segmentation algorithm, and the influence of the character distortion is effectively solved by the perspective transformation, thereby improving the success rate of the license plate recognition.
  • the embodiment of the present application provides an application program for performing the foregoing steps of the license plate recognition method provided by the embodiment of the present application.
  • the application performs the license plate recognition method provided by the embodiment of the present application at runtime, so that the position of each character in the license plate image can be obtained by using a preset image segmentation algorithm, and according to the position of each character. Determining the range of the tilt angle of the license plate image, rotating the license plate image according to the tilt angle range, and performing coordinate transformation by perspective transformation to obtain a license plate image with the same character height, and finally identifying each character to reduce the participation operation
  • the number of images improves the computational efficiency of license plate recognition, and improves the accuracy of character segmentation through preset image segmentation algorithm, and effectively solves the influence of character distortion through perspective transformation, thereby improving the success rate of license plate recognition.

Landscapes

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

Abstract

Provided in embodiments of the present application are a method, device, and system for license plate recognition. The method for license plate recognition comprises: detecting for characters in a captured license plate image by means of a preset image segmentation algorithm, determining the positions of the characters in the license plate image; determining a tilt angle range of the license plate image on the basis of the positions of the characters in the license plate image; rotationally correcting the license plate image according to the tilt angle range to produce a corrected license plate image; acquiring the apex coordinates of the corrected license plate image, transforming the apex coordinates via perspective transformation to produce a transformed license plate image in which the characters are equally tall; and recognizing the characters in the transformed license plate image to produce a recognized license plate. The present solution increases the computational efficiency and success rate of license plate recognition.

Description

一种车牌识别方法、装置及系统License plate recognition method, device and system
本申请要求于2017年06月02日提交中国专利局、申请号为201710408082.7发明名称为“一种车牌识别方法、装置及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application entitled "A License Plate Recognition Method, Apparatus and System" by the Chinese Patent Office, filed on Jun. 2, 2017, the entire disclosure of which is hereby incorporated by reference. in.
技术领域Technical field
本申请涉及智能交通技术领域,特别是涉及一种车牌识别方法、装置及系统。The present application relates to the field of intelligent transportation technologies, and in particular, to a license plate recognition method, device and system.
背景技术Background technique
车牌识别技术是计算机视频图像识别技术在车辆牌照识别中的一种应用。车牌识别技术要求能够将汽车牌照从复杂背景中提取并识别出来,通过车牌提取、图像预处理、特征提取、车牌字符识别等技术,识别车辆牌号。因此,车牌识别技术已在卡口、停车场和电子警察等场景中得到广泛应用,以获取场景内车辆的牌号信息,在治安管理等众多方面发挥重要作用。License plate recognition technology is an application of computer video image recognition technology in vehicle license plate recognition. The license plate recognition technology requires that the license plate can be extracted and recognized from the complex background, and the vehicle license number can be identified through techniques such as license plate extraction, image preprocessing, feature extraction, and license plate character recognition. Therefore, the license plate recognition technology has been widely used in scenes such as bayonet, parking lot and electronic police to obtain the brand information of vehicles in the scene, and plays an important role in many aspects such as public security management.
摄像机在拍摄图像时,可能因为拍摄角度的问题,所拍摄到的车牌图像往往会发生倾斜。针对此类问题,相应的车牌识别方法,通过对预处理图像分别按顺时针、逆时针方向各旋转n度,每次旋转1度,得到2n个旋转图像,统计各旋转图像的水平差分投影,得到水平差分值,然后计算得到水平差分均值,确定2n+1个旋转图像中选出水平差分均值最大的为不倾斜图像,最后识别该不倾斜图像中的车牌。When the camera is shooting an image, the captured license plate image may be tilted due to the shooting angle problem. For such problems, the corresponding license plate recognition method, by rotating the pre-processed image by n degrees in clockwise and counterclockwise directions, each rotation by 1 degree, obtains 2n rotated images, and statistically calculates the horizontal differential projection of each rotated image. The horizontal difference value is obtained, and then the horizontal difference mean value is calculated, and the non-tilted image in which the horizontal difference mean value is selected among the 2n+1 rotation images is determined, and the license plate in the non-tilted image is finally recognized.
但是,针对类似于图1所示的违停球场景的车牌示例,违停球为应用在交通管理系统中的用于拍摄违章停车的特殊球机类摄像设备,所拍摄的车牌图像101的倾斜角度往往较大,如果采用上述方法,需要将n值设置的很大,这样会增加系统运算的耗时,降低运算效率。并且,由于拍摄的角度太大,采集到的车牌图像会发生变形,导致车牌识别的失败概率较高。However, for a license plate example similar to the illegal ball scene shown in FIG. 1, the illegal ball is a special ball type camera device for shooting illegal parking applied in the traffic management system, and the tilt of the photographed license plate image 101 is taken. The angle is often large. If the above method is used, the value of n needs to be set large, which increases the time consumption of the system operation and reduces the operation efficiency. Moreover, since the angle of the shooting is too large, the acquired license plate image will be deformed, resulting in a high probability of failure in license plate recognition.
发明内容Summary of the invention
本申请实施例的目的在于提供一种车牌识别方法、装置及系统,以提高车牌识别的运算效率及成功率。具体技术方案如下:The purpose of the embodiment of the present application is to provide a license plate recognition method, device and system to improve the operation efficiency and success rate of license plate recognition. The specific technical solutions are as follows:
第一方面,本申请实施例提供了一种车牌识别方法,所述方法包括:In a first aspect, an embodiment of the present application provides a license plate recognition method, where the method includes:
通过预设图像分割算法,对采集的车牌图像中的字符进行检测,确定所述车牌图像中每个字符的位置;The characters in the collected license plate image are detected by a preset image segmentation algorithm to determine the position of each character in the license plate image;
根据所述车牌图像中每个字符的位置,确定所述车牌图像的倾斜角度范围;Determining a range of tilt angles of the license plate image according to a position of each character in the license plate image;
按照所述倾斜角度范围,对所述车牌图像进行旋转校正,得到校正车牌图像;Performing rotation correction on the license plate image according to the tilt angle range to obtain a corrected license plate image;
获取所述校正车牌图像的顶点坐标,通过透视变换对所述顶点坐标进行变换,得到字符等高的变换车牌图像;Obtaining a vertex coordinate of the corrected license plate image, and transforming the vertex coordinates by a perspective transformation to obtain a converted license plate image with a character contour;
对所述变换车牌图像中的每个字符进行识别,得到识别后的车牌。Each character in the converted license plate image is identified to obtain a recognized license plate.
可选的,所述预设图像分割算法包括:最大稳定极值区域MSER图像分割算法;Optionally, the preset image segmentation algorithm comprises: a maximum stable extreme value region MSER image segmentation algorithm;
所述通过预设图像分割算法,对采集的车牌图像中的字符进行检测,确定所述车牌图像中每个字符的位置,包括:The determining, by using a preset image segmentation algorithm, the characters in the collected license plate image to determine the position of each character in the license plate image, including:
通过所述MSER图像分割算法,对采集的车牌图像中的字符进行检测,得到每个字符的MSER框位置;The MSER image segmentation algorithm is used to detect characters in the collected license plate image to obtain the MSER frame position of each character;
将每个字符的MSER框位置确定为对应字符的位置。The position of the MSER box of each character is determined as the position of the corresponding character.
可选的,所述根据所述车牌图像中每个字符的位置,确定所述车牌图像的倾斜角度范围,包括:Optionally, determining, according to a position of each character in the license plate image, a range of tilt angles of the license plate image, including:
根据所述车牌图像中每个字符的位置,确定所述车牌图像中每个字符的中心点坐标;Determining a center point coordinate of each character in the license plate image according to a position of each character in the license plate image;
根据每个字符的中心点坐标,通过最小二乘法,确定所述车牌图像相较于水平方向的斜率;Determining a slope of the license plate image compared to a horizontal direction by a least squares method according to a center point coordinate of each character;
根据所述斜率,确定所述车牌图像相较于水平方向的偏移角度;Determining, according to the slope, an offset angle of the license plate image compared to a horizontal direction;
根据所述偏移角度及预设搜索角度范围,确定所述车牌图像的倾斜角度范围。Determining a range of tilt angles of the license plate image according to the offset angle and a preset search angle range.
可选的,所述按照所述倾斜角度范围,对所述车牌图像进行旋转校正,得到校正车牌图像,包括:Optionally, the performing the rotation correction on the license plate image according to the tilt angle range to obtain a corrected license plate image includes:
按照所述倾斜角度范围,对所述车牌图像进行Radon变换,得到所述车牌图像的水平倾斜角度;Performing a Radon transform on the license plate image according to the tilt angle range to obtain a horizontal tilt angle of the license plate image;
根据所述水平倾斜角度,将所述车牌图像进行旋转校正,得到水平倾斜校正后的车牌图像;Performing rotation correction on the license plate image according to the horizontal tilt angle to obtain a license plate image after horizontal tilt correction;
按照所述倾斜角度范围,对所述水平倾斜校正后的车牌图像进行Radon变换,得到所述水平倾斜校正后的车牌图像的垂直倾斜角度;Performing a Radon transform on the license plate image after the horizontal tilt correction according to the tilt angle range, to obtain a vertical tilt angle of the license plate image after the horizontal tilt correction;
根据所述垂直倾斜角度,对所述水平倾斜校正后的车牌图像进行校正,得到校正车牌图像。Correcting the horizontal tilt corrected license plate image according to the vertical tilt angle to obtain a corrected license plate image.
可选的,所述获取所述校正车牌图像的顶点坐标,通过透视变换对所述顶点坐标进行变换,得到字符等高的变换车牌图像,包括:Optionally, the acquiring the coordinates of the vertex of the corrected license plate image, transforming the coordinates of the vertex by perspective transformation, and obtaining a converted license plate image with the same character height, including:
根据所述校正车牌图像的首字符的MSER框位置及末尾字符的MSER框位置,获取得到所述校正车牌图像的顶点坐标;Obtaining vertex coordinates of the corrected license plate image according to the position of the MSER frame of the first character of the corrected license plate image and the position of the MSER frame of the last character;
对所述顶点坐标进行变换,得到字符等高的顶点变换坐标;Transforming the vertex coordinates to obtain vertex transformation coordinates of a character contour;
对所述顶点变换坐标进行计算,得到变换参数;Calculating the vertex transformation coordinates to obtain transformation parameters;
根据所述透视变换通用公式及所述变换参数,得到所述顶点坐标与所述顶点变换坐标的映射关系;Obtaining a mapping relationship between the vertex coordinates and the vertex transformation coordinates according to the perspective transformation general formula and the transformation parameters;
根据所述映射关系及所述校正车牌图像,得到变换车牌图像。A converted license plate image is obtained based on the mapping relationship and the corrected license plate image.
可选的,所述对所述变换车牌图像中的每个字符进行识别,得到识别后的车牌,包括:Optionally, the identifying each character in the converted license plate image to obtain the recognized license plate includes:
利用多个预设车牌模板对所述变换车牌图像进行字符位置匹配,确定所述变换车牌图像中与预设车牌模板相匹配的字符的位置;Performing character position matching on the converted license plate image by using a plurality of preset license plate templates, and determining a position of a character in the converted license plate image that matches a preset license plate template;
分别将每个位置上的字符输入预设神经网络进行模板匹配,得到每个字符的模板匹配置信度;The characters in each position are respectively input into a preset neural network for template matching, and the template matching confidence of each character is obtained;
获取所述变换车牌图像中每个字符的MSER框位置对应的MSER结果置 信度;Acquiring the MSER result confidence corresponding to the position of the MSER frame of each character in the converted license plate image;
依次比较每个字符的模板匹配置信度与该字符对应MSER框位置的MSER结果置信度,并在所述MSER结果置信度大于所述模板匹配置信度时,更新该位置的字符为所述MSER结果对应MSER框位置的字符;The template matching confidence of each character is compared with the MSER result confidence of the MSER frame position corresponding to the character, and when the MSER result confidence is greater than the template matching confidence, the character of the location is updated to be the MSER result. The character corresponding to the position of the MSER box;
确定更新后的变换车牌图像为识别后的车牌。The updated converted license plate image is determined to be the recognized license plate.
第二方面,本申请实施例提供了一种车牌识别装置,所述装置包括:In a second aspect, an embodiment of the present application provides a license plate recognition device, where the device includes:
字符位置确定模块,用于通过预设图像分割算法,对采集的车牌图像中的字符进行检测,确定所述车牌图像中每个字符的位置;a character position determining module, configured to detect, by using a preset image segmentation algorithm, characters in the collected license plate image to determine a position of each character in the license plate image;
车牌倾斜角度确定模块,用于根据所述车牌图像中每个字符的位置,确定所述车牌图像的倾斜角度范围;a license plate tilt angle determining module, configured to determine a tilt angle range of the license plate image according to a position of each character in the license plate image;
车牌旋转校正模块,用于按照所述倾斜角度范围,对所述车牌图像进行旋转校正,得到校正车牌图像;a license plate rotation correction module, configured to perform rotation correction on the license plate image according to the tilt angle range to obtain a corrected license plate image;
车牌畸变校正模块,用于获取所述校正车牌图像的顶点坐标,通过透视变换对所述顶点坐标进行变换,得到字符等高的变换车牌图像;a license plate distortion correction module, configured to acquire vertex coordinates of the corrected license plate image, and transform the vertex coordinates by perspective transformation to obtain a converted license plate image with a character contour;
车牌字符识别模块,用于对所述变换车牌图像中的每个字符进行识别,得到识别后的车牌。The license plate character recognition module is configured to identify each character in the converted license plate image to obtain the recognized license plate.
可选的,所述预设图像分割算法包括:最大稳定极值区域MSER图像分割算法;Optionally, the preset image segmentation algorithm comprises: a maximum stable extreme value region MSER image segmentation algorithm;
所述字符位置确定模块,具体用于:The character position determining module is specifically configured to:
通过所述MSER图像分割算法,对采集的车牌图像中的字符进行检测,得到每个字符的MSER框位置;The MSER image segmentation algorithm is used to detect characters in the collected license plate image to obtain the MSER frame position of each character;
将每个字符的MSER框位置确定为对应字符的位置。The position of the MSER box of each character is determined as the position of the corresponding character.
可选的,所述车牌倾斜角度确定模块,具体用于:Optionally, the license plate tilt angle determining module is specifically configured to:
根据所述车牌图像中每个字符的位置,确定所述车牌图像中每个字符的中心点坐标;Determining a center point coordinate of each character in the license plate image according to a position of each character in the license plate image;
根据每个字符的中心点坐标,通过最小二乘法,确定所述车牌图像相较于水平方向的斜率;Determining a slope of the license plate image compared to a horizontal direction by a least squares method according to a center point coordinate of each character;
根据所述斜率,确定所述车牌图像相较于水平方向的偏移角度;Determining, according to the slope, an offset angle of the license plate image compared to a horizontal direction;
根据所述偏移角度及预设搜索角度范围,确定所述车牌图像的倾斜角度范围。Determining a range of tilt angles of the license plate image according to the offset angle and a preset search angle range.
可选的,所述车牌旋转校正模块,具体用于:Optionally, the license plate rotation correction module is specifically configured to:
按照所述倾斜角度范围,对所述车牌图像进行Radon变换,得到所述车牌图像的水平倾斜角度;Performing a Radon transform on the license plate image according to the tilt angle range to obtain a horizontal tilt angle of the license plate image;
根据所述水平倾斜角度,将所述车牌图像进行旋转校正,得到水平倾斜校正后的车牌图像;Performing rotation correction on the license plate image according to the horizontal tilt angle to obtain a license plate image after horizontal tilt correction;
按照所述倾斜角度范围,对所述水平倾斜校正后的车牌图像进行Radon变换,得到所述水平倾斜校正后的车牌图像的垂直倾斜角度;Performing a Radon transform on the license plate image after the horizontal tilt correction according to the tilt angle range, to obtain a vertical tilt angle of the license plate image after the horizontal tilt correction;
根据所述垂直倾斜角度,对所述水平倾斜校正后的车牌图像进行校正,得到校正车牌图像。Correcting the horizontal tilt corrected license plate image according to the vertical tilt angle to obtain a corrected license plate image.
可选的,所述车牌畸变校正模块,具体用于:Optionally, the license plate distortion correction module is specifically configured to:
根据所述校正车牌图像的首字符的MSER框位置及末尾字符的MSER框位置,获取得到所述校正车牌图像的顶点坐标;Obtaining vertex coordinates of the corrected license plate image according to the position of the MSER frame of the first character of the corrected license plate image and the position of the MSER frame of the last character;
对所述顶点坐标进行变换,得到字符等高的顶点变换坐标;Transforming the vertex coordinates to obtain vertex transformation coordinates of a character contour;
对所述顶点变换坐标进行计算,得到变换参数;Calculating the vertex transformation coordinates to obtain transformation parameters;
根据所述透视变换通用公式及所述变换参数,得到所述顶点坐标与所述顶点变换坐标的映射关系;Obtaining a mapping relationship between the vertex coordinates and the vertex transformation coordinates according to the perspective transformation general formula and the transformation parameters;
根据所述映射关系及所述校正车牌图像,得到变换车牌图像。A converted license plate image is obtained based on the mapping relationship and the corrected license plate image.
可选的,所述车牌字符识别模块,具体用于:Optionally, the license plate character recognition module is specifically configured to:
利用多个预设车牌模板对所述变换车牌图像进行字符位置匹配,确定所述变换车牌图像中与预设车牌模板相匹配的字符的位置;Performing character position matching on the converted license plate image by using a plurality of preset license plate templates, and determining a position of a character in the converted license plate image that matches a preset license plate template;
分别将每个位置上的字符输入预设神经网络进行模板匹配,得到每个字符的模板匹配置信度;The characters in each position are respectively input into a preset neural network for template matching, and the template matching confidence of each character is obtained;
获取所述变换车牌图像中每个字符的MSER框位置对应的MSER结果置信度;Obtaining a confidence level of the MSER result corresponding to the position of the MSER frame of each character in the converted license plate image;
依次比较每个字符的模板匹配置信度与该字符对应MSER框位置的MSER结果置信度,并在所述MSER结果置信度大于所述模板匹配置信度时,更新该位置的字符为所述MSER结果对应MSER框位置的字符;The template matching confidence of each character is compared with the MSER result confidence of the MSER frame position corresponding to the character, and when the MSER result confidence is greater than the template matching confidence, the character of the location is updated to be the MSER result. The character corresponding to the position of the MSER box;
确定更新后的变换车牌图像为识别后的车牌。The updated converted license plate image is determined to be the recognized license plate.
第三方面,本申请实施例提供了一种车牌识别系统,所述系统包括:In a third aspect, an embodiment of the present application provides a license plate recognition system, where the system includes:
图像采集设备,用于对车辆进行拍摄,得到车牌图像;An image capture device for photographing a vehicle to obtain a license plate image;
存储器,用于存放计算机程序;a memory for storing a computer program;
处理器,用于执行所述存储器上所存放的程序时,实现本申请实施例第一方面所提供的方法步骤。The method steps provided by the first aspect of the embodiments of the present application are implemented when the processor is configured to execute the program stored in the memory.
第四方面,本申请实施例提供了一种存储介质,用于存储可执行代码,所述可执行代码用于在运行时执行:本申请实施例第一方面所提供的方法步骤。In a fourth aspect, an embodiment of the present application provides a storage medium for storing executable code, where the executable code is used to execute at a runtime: the method steps provided by the first aspect of the embodiment of the present application.
第五方面,本申请实施例提供了一种应用程序,用于在运行时执行:本申请实施例第一方面所提供的方法步骤。In a fifth aspect, an embodiment of the present application provides an application program for performing, at runtime, the method steps provided by the first aspect of the embodiment of the present application.
本申请实施例提供的一种车牌识别方法、装置及系统,通过预设图像分割算法,得到车牌图像中每个字符的位置,并且根据每个字符的位置确定车牌图像的倾斜角度范围,按照该倾斜角度范围,对车牌图像进行旋转校正,并通过透视变换进行坐标变换,得到字符等高的车牌图像,最后通过对每个字符进行识别,从而减少参与运算的图像数量,提高车牌识别的运算效率,并且通过预设图像分割算法提高了字符分割的准确性、通过透视变换有效解决字符畸变的影响,从而提高了车牌识别的成功率。A method, device and system for license plate recognition provided by an embodiment of the present invention obtain a position of each character in a license plate image by a preset image segmentation algorithm, and determine a range of inclination angles of the license plate image according to the position of each character, according to the The tilt angle range is used to rotate the license plate image, and the coordinate transformation is performed by perspective transformation to obtain the license plate image with the same character height. Finally, each character is identified, thereby reducing the number of images participating in the operation and improving the operation efficiency of the license plate recognition. And through the preset image segmentation algorithm, the accuracy of character segmentation is improved, and the influence of character distortion is effectively solved by perspective transformation, thereby improving the success rate of license plate recognition.
附图说明DRAWINGS
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例 和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application and the technical solutions of the prior art, the following description of the embodiments and the drawings used in the prior art will be briefly introduced. Obviously, the drawings in the following description are only Some embodiments of the application may also be used to obtain other figures from those of ordinary skill in the art without departing from the scope of the invention.
图1为现有技术中违停球场景的车牌示例;1 is an example of a license plate in a prior art ball scene;
图2为本申请实施例的车牌识别方法的流程示意图;2 is a schematic flow chart of a license plate recognition method according to an embodiment of the present application;
图3为本申请实施例的通过MSER检测出的字符位置示意图;3 is a schematic diagram of a character position detected by an MSER according to an embodiment of the present application;
图4a为本申请实施例的通过X方向Radon变换后旋转得到的水平倾斜校正后的车牌图像;4a is a license plate image after horizontal tilt correction obtained by rotating after X-direction Radon transform according to an embodiment of the present application;
图4b为本申请实施例的通过Y方向Radon变换后校正得到的校正车牌图像;4b is a corrected license plate image corrected by the Radon transform in the Y direction according to an embodiment of the present application;
图5a为本申请实施例的基于字符信息求取关键点的示意图;FIG. 5a is a schematic diagram of obtaining key points based on character information according to an embodiment of the present application; FIG.
图5b为本申请实施例的通过透视变换得到的字符等高的变换车牌图像;FIG. 5b is a converted license plate image of a character contour obtained by perspective transformation according to an embodiment of the present application; FIG.
图6为本申请实施例的车牌识别装置的结构示意图;6 is a schematic structural diagram of a license plate recognition device according to an embodiment of the present application;
图7为本申请实施例的车牌识别系统的结构示意图。FIG. 7 is a schematic structural diagram of a license plate recognition system according to an embodiment of the present application.
具体实施方式detailed description
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings. It is apparent that the described embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
为了提高车牌识别的运算效率及成功率,本申请实施例提供了一种车牌识别方法、装置及系统。In order to improve the computing efficiency and success rate of the license plate recognition, the embodiment of the present application provides a license plate recognition method, device and system.
下面首先对本申请实施例所提供的一种车牌识别方法进行介绍。First, a license plate recognition method provided by an embodiment of the present application is introduced.
本申请实施例所提供的一种车牌识别方法的执行主体可以为一种搭载有核心处理芯片的处理器,例如,可以是搭载了DSP(Digital Signal Processor,数字信号处理器)、ARM(Advanced Reduced Instruction Set Computer Machines, 精简指令集计算机微处理器)或者FPGA(Field-Programmable Gate Array,现场可编程门阵列)等核心处理芯片的处理器。实现本申请实施例所提供的一种车牌识别方法的方式可以为设置于执行主体中的软件、硬件电路和逻辑电路中的至少一种方式。The execution body of the license plate recognition method provided by the embodiment of the present application may be a processor equipped with a core processing chip, for example, a DSP (Digital Signal Processor) and an ARM (Advanced Reduced). Instruction Set Computer Machines, processors of core processing chips such as FPGAs (Field-Programmable Gate Arrays). A manner of implementing a license plate recognition method provided by an embodiment of the present application may be at least one of software, hardware circuits, and logic circuits disposed in an execution body.
如图2所示,本申请实施例所提供的一种车牌识别方法,可以包括如下步骤:As shown in FIG. 2, a license plate recognition method provided by an embodiment of the present application may include the following steps:
S201,通过预设图像分割算法,对采集的车牌图像中的字符进行检测,确定车牌图像中每个字符的位置。S201: The preset image segmentation algorithm is used to detect characters in the collected license plate image to determine the position of each character in the license plate image.
图像分割算法可以为基于边缘的图像分割算法、也可以是基于区域的图像分割算法、还可以是基于纹理的图像分割算法。可以通过需要分割的图像样本的特点选择适当的图像分割算法。其中,预设图像分割算法包括:MSER(Maximally Stable Extremal Regions,最大稳定极值区域)图像分割算法。目前在图像处理领域中,MSER被认为是性能最好的仿射不变区域,MSER是当使用不同的灰度阈值对图像进行二值化时得到的最稳定的区域。MSER具有以下特点:对于图像灰度的仿射变化具有不变性;稳定性,区域的支持集相对灰度变化稳定;可以检测不同精细程度的区域。因此,为了使得图像分割具有较高的稳定性,且可以检测不同精细程度,本申请实施例采用MESR作为预设图像分割算法。具体的,MSER提取过程包括:使用一系列灰度阈值对图像进行二值化处理;对于每个阈值得到的二值图像,得到相应的黑色区域与白色区域;确定在比较宽的灰度阈值范围内保持形状稳定的区域。通过预设图像分割算法对车牌图像中的字符进行检测,实际就是通过预设图像分析算法对车牌图像中的字符进行识别、分割的过程,从而识别出车牌图像中每个字符所处的区域,根据每个字符所处区域的顶点坐标,或者根据每个字符所处区域的顶点距图像边缘的距离,可以确定每个字符所处的区域的位置,从而确定每个字符的位置。其他通过坐标、距离、角度等实现位置确定的方式均属于本申请实施例的保护范围,这里不再一一赘述。The image segmentation algorithm may be an edge-based image segmentation algorithm, a region-based image segmentation algorithm, or a texture-based image segmentation algorithm. An appropriate image segmentation algorithm can be selected by the characteristics of the image samples that need to be segmented. The preset image segmentation algorithm includes: an image segmentation algorithm of MSER (Maximally Stable Extremal Regions). Currently in the field of image processing, MSER is considered to be the best performing affine invariant region, and MSER is the most stable region obtained when binarizing images using different gray thresholds. The MSER has the following characteristics: it has invariance to the affine change of the image gray scale; stability, the support set of the region is stable with respect to the gray scale change; and the region of different fineness can be detected. Therefore, in order to make the image segmentation have higher stability and can detect different degrees of fineness, the embodiment of the present application adopts the MESR as a preset image segmentation algorithm. Specifically, the MSER extraction process includes: binarizing the image using a series of gray thresholds; obtaining a corresponding black region and a white region for each binary image obtained by the threshold; determining a wider gray threshold range Maintain a stable shape inside the area. The preset image segmentation algorithm is used to detect the characters in the license plate image. The actual process is to identify and segment the characters in the license plate image by using a preset image analysis algorithm, thereby identifying the region where each character in the license plate image is located. Depending on the vertex coordinates of the area in which each character is located, or based on the distance of the vertex of the area in which each character is located from the edge of the image, the position of the area in which each character is located can be determined to determine the position of each character. Other ways of determining the position by the coordinates, the distance, the angle, and the like are all in the protection scope of the embodiment of the present application, and are not described herein again.
可选的,S201具体可以为:Optionally, S201 can be specifically:
第一步,通过MSER图像分割算法,对采集的车牌图像中的字符进行检测,得到每个字符的MSER框位置;In the first step, the MSER image segmentation algorithm is used to detect the characters in the collected license plate image to obtain the position of the MSER frame of each character;
第二步,将每个字符的MSER框位置确定为对应字符的位置。In the second step, the position of the MSER box of each character is determined as the position of the corresponding character.
通过MSER算法,得到每个字符的MSER框,每个MSER框中分别包含一个字符,则确定每个字符在图像中的具体位置,可以根据每个字符的MSER框的顶点坐标确定,或者根据MSER框的顶点距图像边缘的距离确定。其他通过坐标、距离、角度等实现位置确定的方式均属于本申请实施例的保护范围,这里不再一一赘述。Through the MSER algorithm, the MSER frame of each character is obtained, and each MSER box contains one character, and then the specific position of each character in the image is determined, which can be determined according to the vertex coordinates of the MSER frame of each character, or according to the MSER The distance from the vertex of the frame to the edge of the image is determined. Other ways of determining the position by the coordinates, the distance, the angle, and the like are all in the protection scope of the embodiment of the present application, and are not described herein again.
S202,根据车牌图像中每个字符的位置,确定车牌图像的倾斜角度范围。S202. Determine a range of tilt angles of the license plate image according to the position of each character in the license plate image.
在字符位置确定以后,可以根据每个字符的位置确定车牌图像的倾斜角度,例如,可以根据每个字符的中心点的坐标确定车牌图像的倾斜角度,也可以根据每个字符所处的区域的顶点坐标确定车牌图像的倾斜角度,还可以根据每个字符所处的区域的某个相应位置坐标确定车牌图像的倾斜角度,这都属于本申请实施例的保护范围。由于图像拍摄时存在着干扰,通过上述方法得到倾斜角度与实际的倾斜角度之间会存在一定的误差,因此,为了提高检测的准确率,可以在上述得到的倾斜角度的基础上设置一定的偏差范围,确定车牌图像的倾斜角度范围。例如,计算得到的车牌倾斜角度为29度,则可以在此基础上允许3度的偏差,则车牌图像的倾斜角度范围为大于或等于26度且小于或等于32度。After the character position is determined, the tilt angle of the license plate image may be determined according to the position of each character. For example, the tilt angle of the license plate image may be determined according to the coordinates of the center point of each character, or may be based on the area in which each character is located. The vertex coordinates determine the tilt angle of the license plate image, and the tilt angle of the license plate image can also be determined according to a certain corresponding position coordinate of the region in which each character is located, which is a protection range of the embodiment of the present application. Since there is interference during image capturing, there is a certain error between the tilt angle and the actual tilt angle by the above method. Therefore, in order to improve the detection accuracy, a certain deviation can be set based on the tilt angle obtained above. Range to determine the range of tilt angles of the license plate image. For example, if the calculated license plate tilt angle is 29 degrees, a deviation of 3 degrees may be allowed on the basis, and the tilt angle of the license plate image may be greater than or equal to 26 degrees and less than or equal to 32 degrees.
可选的,S202具体可以为:Optionally, S202 can be specifically:
第一步,根据车牌图像中每个字符的位置,确定车牌图像中每个字符的中心点坐标;In the first step, determining the coordinates of the center point of each character in the license plate image according to the position of each character in the license plate image;
第二步,根据每个字符的中心点坐标,通过最小二乘法,确定车牌图像相较于水平方向的斜率;In the second step, according to the coordinates of the center point of each character, the slope of the license plate image compared to the horizontal direction is determined by a least squares method;
第三步,根据斜率,确定车牌图像相较于水平方向的偏移角度;The third step is to determine an offset angle of the license plate image compared to the horizontal direction according to the slope;
第四步,根据偏移角度及预设搜索角度范围,确定车牌图像的倾斜角度范围。In the fourth step, the tilt angle range of the license plate image is determined according to the offset angle and the preset search angle range.
为了保证倾斜角度计算的准确性,由于每个字符所处的区域的大小不确定,如果根据区域的顶点坐标确定倾斜角度,可能会带来一定的误差,因此, 本实施例中,通过每个字符的中心点坐标确定倾斜角度。在确定每个中心点坐标后,可以对所有中心点坐标的连线求斜率,对该斜率进行运算得到所有中心点坐标的连线的倾斜角度即为车牌图像的倾斜角度,当然,其他通过坐标信息确定倾斜角度的方式也属于本申请实施例的保护范围,这里不再赘述。In order to ensure the accuracy of the tilt angle calculation, since the size of the area in which each character is located is uncertain, if the tilt angle is determined according to the vertex coordinates of the area, a certain error may be caused. Therefore, in this embodiment, each The center point coordinates of the character determine the tilt angle. After determining the coordinates of each center point, the slope of all the coordinates of the center point can be obtained, and the slope is calculated to obtain the inclination angle of the line connecting all the coordinates of the center point, that is, the inclination angle of the license plate image. Of course, other passing coordinates The manner of determining the tilt angle of the information also belongs to the protection scope of the embodiment of the present application, and details are not described herein again.
为了提高运算的效率,并保证与实际数据之间的误差最小,本实施例中对确定的中心点坐标,采用最小二乘法确定连线的斜率,最小二乘法就是通过最小化误差的平方和寻找数据的最佳函数匹配的方法。也就是将所有字符的中心点的横坐标、纵坐标分别进行求平均数的运算,然后带入y=kx+b,其中y为所有字符的中心点的纵坐标的平均数,k为所有中心点坐标的连线的斜率,x为所有字符的中心点的横坐标的平均数,b为一常数,进而得到所有中心点坐标的连线的斜率,通过反三角函数arctan(k)即可得到车牌图像的倾斜角度。并且,为了提高检测的准确率,在上述得到的倾斜角度的基础上设置一预设搜索角度范围,例如设置预设搜索角度范围为θ,则车牌图像的倾斜角度范围即为[arctan(k)-θ,arctan(k)+θ]。In order to improve the efficiency of the operation and ensure the minimum error between the actual data and the actual data, in the present embodiment, the slope of the connection is determined by the least squares method for the determined central point coordinates, and the least squares method is to find the square of the error by minimizing the error. The best function matching method for data. That is, the abscissa and the ordinate of the center point of all the characters are respectively subjected to the operation of averaging, and then brought into y=kx+b, where y is the average of the ordinates of the center points of all the characters, and k is the center The slope of the line connecting the point coordinates, x is the average of the abscissa of the center point of all characters, b is a constant, and then the slope of the line connecting all the coordinates of the center point is obtained by the inverse trigonometric function arctan(k). The angle of inclination of the license plate image. Moreover, in order to improve the accuracy of the detection, a preset search angle range is set based on the obtained tilt angle. For example, if the preset search angle range is set to θ, the tilt angle range of the license plate image is [arctan(k) -θ, arctan(k) + θ].
S203,按照倾斜角度范围,对车牌图像进行旋转校正,得到校正车牌图像。S203: Perform rotation correction on the license plate image according to the tilt angle range to obtain a corrected license plate image.
由于采集的车牌图像相较于水平方向具有一定的倾斜角度,为了达到较好的识别效果,需要将车牌图像旋转至水平方向。通过上述方法,可以得到车牌图像的倾斜角度范围,也就是说,车牌图像的倾斜程度,例如车牌图像相较于水平方向倾斜了35度,则需要将车牌图像旋转35度才可以得到校正车牌图像。旋转校正可以理解为按照倾斜角度范围,对车牌图像进行旋转,当然,为了达到更佳的效果,可以采用例如Radon变换的方法对图像进行旋转,Radon变换是分别对横轴方向和纵轴方向进行变换,得到需要旋转的角度,再按横轴方向和纵轴方向对车牌图像分别进行旋转,这样得到的校正车牌图像不仅保证整体是水平的,也同时保证每个字符也是水平的。当然,其他对图像进行旋转校正的方式也属于本申请实施例的保护范围,这里不再一一赘述。Since the acquired license plate image has a certain inclination angle compared to the horizontal direction, in order to achieve a better recognition effect, the license plate image needs to be rotated to the horizontal direction. Through the above method, the range of the tilt angle of the license plate image can be obtained, that is, the degree of tilt of the license plate image, for example, the license plate image is inclined by 35 degrees compared with the horizontal direction, and the license plate image needs to be rotated by 35 degrees to obtain the corrected license plate image. . Rotation correction can be understood as rotating the license plate image according to the range of the tilt angle. Of course, in order to achieve better results, the image can be rotated by, for example, Radon transform, which performs the horizontal axis direction and the vertical axis direction, respectively. Transform, get the angle that needs to be rotated, and then rotate the license plate image separately according to the horizontal axis direction and the vertical axis direction. The corrected license plate image thus obtained not only ensures that the whole is horizontal, but also ensures that each character is also horizontal. Certainly, other manners of performing rotation correction on the image also belong to the protection scope of the embodiment of the present application, and details are not described herein again.
可选的,S203具体可以为:Optionally, S203 can be specifically:
第一步,按照倾斜角度范围,对车牌图像进行Radon变换,得到车牌图像的水平倾斜角度;In the first step, the Radon transform is performed on the license plate image according to the tilt angle range to obtain the horizontal tilt angle of the license plate image;
第二步,根据水平倾斜角度,将车牌图像进行旋转校正,得到水平倾斜校正后的车牌图像;In the second step, the license plate image is rotated and corrected according to the horizontal tilt angle to obtain the license plate image after the horizontal tilt correction;
第三步,按照倾斜角度范围,对水平倾斜校正后的车牌图像进行Radon变换,得到水平倾斜校正后的车牌图像的垂直倾斜角度;In the third step, the Radon transform is performed on the license plate image after the horizontal tilt correction according to the tilt angle range, and the vertical tilt angle of the license plate image after the horizontal tilt correction is obtained;
第四步,根据垂直倾斜角度,对水平倾斜校正后的车牌图像进行校正,得到校正车牌图像。In the fourth step, the license plate image corrected by the horizontal tilt is corrected according to the vertical tilt angle to obtain a corrected license plate image.
由于Radon变换是分别对横轴方向和纵轴方向进行变换、旋转,得到的校正车牌图像不仅保证整体是水平的,同时保证每个字符也是水平的,因此,本实施例采用Radon变换的方式对车牌图像进行旋转校正。具体的Radon变换的具体实现过程是按照倾斜角度范围,首先对车牌图像进行Radon变换,对Radon变换后的结果求一阶导数绝对值的累加和,累加和最大时,其对应的数值即为车牌图像的水平倾斜角度,按照该水平倾斜角度对车牌图像进行水平方向的校正,按照倾斜角度范围,对水平方向校正后的图像进行Radon变换,对Radon变换后的结果求一阶导数绝对值的累加和,累加和最大时,其对应的数值即为图像的垂直倾斜角度,按照该垂直倾斜角度对水平方向校正后的图像进行垂直方向的校正,得到校正车牌图像,得到的校正车牌图像是一个整体很正的车牌图像。Since the Radon transform transforms and rotates the horizontal axis direction and the vertical axis direction respectively, the obtained corrected license plate image not only ensures that the whole is horizontal, but also ensures that each character is also horizontal. Therefore, this embodiment adopts the Radon transform method. The license plate image is rotated for correction. The specific implementation process of the Radon transform is based on the tilt angle range. First, the Radon transform is performed on the license plate image. The cumulative result of the first derivative is obtained from the Radon transform result. When the sum is maximum, the corresponding value is the license plate. The horizontal tilt angle of the image is corrected horizontally according to the horizontal tilt angle, and the Radon transform is performed on the horizontally corrected image according to the tilt angle range, and the absolute value of the first derivative is added to the Radon transform result. And, when accumulating and maximizing, the corresponding value is the vertical tilt angle of the image, and the horizontally corrected image is corrected in the vertical direction according to the vertical tilt angle to obtain a corrected license plate image, and the obtained corrected license plate image is a whole. Very positive license plate image.
S204,获取校正车牌图像的顶点坐标,通过透视变换对顶点坐标进行变换,得到字符等高的变换车牌图像。S204: Acquire a vertex coordinate of the corrected license plate image, and transform the vertex coordinates by a perspective transformation to obtain a converted license plate image with the same character height.
如果采集的车牌图像的倾斜角度过大时,会使得旋转校正后得到的校正车牌图像中靠近图像采集设备侧的字符偏大,远离图像采集设备侧的字符偏小,因为字符宽度和高度的不均匀,导致后续的字符识别的失败概率较高。因此,需要通过对校正车牌图像的字符的高度和宽度进行调整,将图像调整为字符等高的变换车牌图像。对图像的高度和宽度调整,可以通过坐标进行变换实现,而对坐标变换的过程实际就是投影的过程,因此,本申请实施例采用透视变换的方法对坐标进行变换。透视变换就是将图像投影到一个新的视平面,在新的视平面中每个坐标点与原始图像之间具有对应关系。If the angle of inclination of the acquired license plate image is too large, the characters in the corrected license plate image obtained after the rotation correction are closer to the image acquisition device side, and the characters away from the image acquisition device side are smaller because the character width and height are not Uniformity leads to a higher probability of failure for subsequent character recognition. Therefore, it is necessary to adjust the height and width of the characters of the corrected license plate image to adjust the image to a converted license plate image having the same character height. The height and width adjustment of the image can be realized by transforming the coordinates, and the process of the coordinate transformation is actually a process of projection. Therefore, the embodiment of the present application uses a perspective transformation method to transform the coordinates. The perspective transformation is to project the image to a new view plane, and each coordinate point has a corresponding relationship with the original image in the new view plane.
可选的,S204具体可以为:Optionally, S204 may be specifically:
第一步,根据校正车牌图像的首字符的MSER框位置及末尾字符的MSER框位置,获取得到校正车牌图像的顶点坐标;In the first step, according to the position of the MSER frame of the first character of the license plate image and the position of the MSER frame of the last character, the vertex coordinates of the corrected license plate image are obtained;
第二步,对顶点坐标进行变换,得到字符等高的顶点变换坐标;In the second step, the vertex coordinates are transformed to obtain vertex transformation coordinates of the character contour;
第三步,对顶点变换坐标进行计算,得到变换参数;In the third step, the coordinates of the vertex transformation are calculated to obtain a transformation parameter;
第四步,根据透视变换通用公式及变换参数,得到顶点坐标与顶点变换坐标的映射关系;In the fourth step, according to the general formula of the perspective transformation and the transformation parameters, the mapping relationship between the vertex coordinates and the vertex transformation coordinates is obtained;
第五步,根据映射关系及校正车牌图像,得到变换车牌图像。In the fifth step, the converted license plate image is obtained according to the mapping relationship and the correction of the license plate image.
由于一张图像中有多个坐标点,如果对每个坐标点都做变换会使得运算量巨大,因此,在本实施例中,只需要对校正车牌图像的四个顶点坐标进行变换,其他坐标做相应变换即可得到变换车牌图像。具体的,透视变换的通用变换公式如(1)所示:Since there are a plurality of coordinate points in one image, if the transformation is performed for each coordinate point, the calculation amount is huge. Therefore, in this embodiment, only the coordinates of the four vertex of the corrected license plate image need to be transformed, and other coordinates are used. The corresponding license image can be obtained to obtain the converted license plate image. Specifically, the general transformation formula of perspective transformation is as shown in (1):
Figure PCTCN2018083385-appb-000001
Figure PCTCN2018083385-appb-000001
其中,x为变换车牌图像中该顶点的横坐标、y为变换车牌图像中该顶点的纵坐标,u为车牌图像中某一顶点的横坐标,v为车牌图像中该顶点的纵坐标,a 11至a 33为变换参数。因此,已知变换对应的四个顶点便可确定变换车牌图像的顶点坐标。具体的,校正车牌图像的四个顶点坐标可以根据首尾字符的MSER框位置的顶点坐标获取到。设校正车牌图像的四个顶点坐标分别为(x0,y0)(x1,y1)(x2,y2)(x3,y3),为了保证变换后的图像的每个字符等高,则变换后的点的坐标应该分别为(x0-b,y1)(x1,y1)(x2,y2)(x3-b,y2),其中,b为修正数值,也就是使得调整后点(x-b,y1)与点(x3-b,y2)的横坐标相等,这样,通过通用变换公式(1)得到a 11至a 33的值,从而得到映射关系。 Where x is the abscissa of the vertex in the transformed license plate image, y is the ordinate of the vertex in the transformed license plate image, u is the abscissa of a vertex in the license plate image, and v is the ordinate of the vertex in the license plate image, a 11 to a 33 are transformation parameters. Therefore, it is known that the four vertices corresponding to the transformation can determine the vertex coordinates of the transformed license plate image. Specifically, the four vertex coordinates of the corrected license plate image can be obtained according to the vertex coordinates of the MSER frame position of the first and last characters. Let the coordinates of the four vertices of the corrected license plate image be (x0, y0) (x1, y1) (x2, y2) (x3, y3), in order to ensure the contour height of each character of the transformed image, the transformed point The coordinates should be (x0-b, y1)(x1, y1)(x2, y2)(x3-b, y2), where b is the correction value, that is, the adjusted point (xb, y1) and point The abscissas of (x3-b, y2) are equal, and thus the values of a 11 to a 33 are obtained by the general transformation formula (1), thereby obtaining a mapping relationship.
S205,对变换车牌图像中的每个字符进行识别,得到识别后的车牌。S205: Identify each character in the converted license plate image to obtain the recognized license plate.
在得到变换车牌图像后,需要对车牌的字符进行识别,例如,通过BP神经网络识别、根据卷积神经网络识别,或者自学习识别,都可以对车牌图像 中的字符识别出来。当然,其他识别车牌图像中字符的方式都属于本申请实施例保护的范围,这里不再一一赘述。以BP网络为例,BP网络是一种按误差逆传播算法训练的多层前馈网络,是目前应用最广泛的神经网络模型之一。BP网络具有学习和存贮大量的输入输出模式映射关系,而无需事前揭示描述这种映射关系的数学方程的优点。After the converted license plate image is obtained, the characters of the license plate need to be identified, for example, by BP neural network recognition, according to convolutional neural network recognition, or self-learning recognition, characters in the license plate image can be recognized. Certainly, the manner of identifying the characters in the license plate image is within the scope of protection of the embodiment of the present application, and details are not described herein again. Taking BP network as an example, BP network is a multi-layer feedforward network trained by error inverse propagation algorithm. It is one of the most widely used neural network models. The BP network has the ability to learn and store a large number of input-output mode mapping relationships without the need to disclose the mathematical equations describing such mapping relationships in advance.
可选的,S205具体可以为:Optionally, S205 can be specifically:
第一步,利用多个预设车牌模板对变换车牌图像进行字符位置匹配,确定变换车牌图像中与预设车牌模板相匹配的字符的位置;In the first step, using a plurality of preset license plate templates to perform character position matching on the converted license plate image, and determining a position of the character in the converted license plate image that matches the preset license plate template;
第二步,分别将每个位置上的字符输入预设神经网络进行模板匹配,得到每个字符的模板匹配置信度;In the second step, the characters in each position are respectively input into a preset neural network for template matching, and the template matching confidence of each character is obtained;
第三步,获取变换车牌图像中每个字符的MSER框位置对应的MSER结果置信度;In the third step, obtaining the confidence of the MSER result corresponding to the position of the MSER frame of each character in the converted license plate image;
第四步,依次比较每个字符的模板匹配置信度与该字符对应MSER框位置的MSER结果置信度,并在MSER结果置信度大于模板匹配置信度时,更新该位置的字符为MSER结果对应MSER框位置的字符;In the fourth step, the template matching confidence of each character is compared with the MSER result confidence of the MSER frame position corresponding to the character, and when the MSER result confidence is greater than the template matching confidence, the character of the position is updated as the MSER result corresponding to the MSER. The character of the box position;
第五步,确定更新后的变换车牌图像为识别后的车牌。In the fifth step, it is determined that the updated converted license plate image is the recognized license plate.
模板匹配的方法,是在一幅大图像中搜寻目标,已知该图中有要找的目标,且该目标同模板有相同的尺寸、方向和图像,通过一定的算法可以在图中找到目标,确定其坐标位置,通过神经网络的识别方法确定每个位置上字符的模板匹配置信度。由于在图像分割、选择、字符识别时,变换车牌图像的部分字符可能会发生畸变,使得模板匹配置信度的值可能会较低,其中,置信度可以为一个概率值、也可以是评价值,概率值为车牌图像中某一字符为哪个标准字符的概率,评价值为根据清晰度判断车牌图像中某一字符相近与哪个标准字符的分值,该分值可以为10分以内的评分值也可以是100分以内的评分值。MSER方法在对图像进行分割时就可以得到MSER框位置相对的MSER结果置信度,也就是某一个MSER框内的字符为哪个标准字符的程度。将模板匹配的结果置信度和MSER结果置信度进行逐个字符的比较,利用模板匹配的结果置信度和MSER结果置信度中较大的结果对变换车牌图像 中对应字符位置进行更新,在所有的字符都识别完之后就可以确定更新识别后的车牌图像。当然,为了提高字符识别的准确度,可以设置一阈值,在MSER结果置信度比模板匹配置信度大于该阈值时,对字符位置进行更新。The method of template matching is to search for a target in a large image. It is known that there are targets to be found in the figure, and the target has the same size, direction and image as the template, and the target can be found in the figure by a certain algorithm. Determine the coordinate position, and determine the template matching confidence of the characters at each position by the neural network identification method. Due to image segmentation, selection, and character recognition, some characters of the license plate image may be distorted, so that the value of the template matching confidence may be lower, wherein the confidence may be a probability value or an evaluation value. The probability value is the probability of which standard character is a character in the license plate image. The evaluation value is a score of which standard character is similar to a character in the license plate image according to the definition, and the score may be a score within 10 minutes. It can be a score within 100 points. The MSER method can obtain the confidence of the MSER result relative to the position of the MSER frame when segmenting the image, that is, the degree to which the standard characters in a certain MSER box are. The result matching confidence of the template matching and the confidence of the MSER result are compared character by character, and the corresponding character position in the converted license plate image is updated by the larger result of the template matching result confidence and the MSER result confidence, in all characters After the identification is completed, it is possible to determine the updated license plate image. Of course, in order to improve the accuracy of character recognition, a threshold may be set, and the position of the character is updated when the confidence of the MSER result is greater than the threshold of the template.
应用本实施例,通过预设图像分割算法,得到车牌图像中每个字符的位置,并且根据每个字符的位置确定车牌图像的倾斜角度范围,按照该倾斜角度范围,对车牌图像进行旋转矫正,并通过透视变换进行坐标变换,得到字符等高的车牌图像,最后通过对每个字符进行识别,从而减少参与运算的图像数量,提高车牌识别的运算效率,并且通过预设图像分割算法提高了字符分割的准确性、通过透视变换有效解决字符畸变的影响,从而提高了车牌识别的成功率。Applying the embodiment, the position of each character in the license plate image is obtained by preset image segmentation algorithm, and the tilt angle range of the license plate image is determined according to the position of each character, and the license plate image is rotated and corrected according to the tilt angle range. Through the perspective transformation, the coordinate transformation is carried out to obtain the license plate image with the same character height. Finally, each character is identified, thereby reducing the number of images participating in the operation, improving the operation efficiency of the license plate recognition, and improving the characters by the preset image segmentation algorithm. The accuracy of segmentation and the effect of character distortion are effectively solved by perspective transformation, thereby improving the success rate of license plate recognition.
下面结合具体的应用实例,对本申请实施例所提供的车牌识别方法进行介绍。The license plate recognition method provided by the embodiment of the present application is introduced below in conjunction with a specific application example.
针对如图1所示车牌示例中,图像采集设备采集到的车牌图像,通过MSER检测出的字符位置如图3中每个字符形成的方框所示,并且,图3中的直线301为车牌图像中所有字符的中心点坐标的连线,通过对直线301的斜率进行计算得到车牌图像的倾斜角度为40度,设定需要搜索的角度范围为15度,则车牌图像的倾斜角度范围为25度至55度。然后根据车牌图像的倾斜角度范围,通过X方向Radon变换,对倾斜车牌进行旋转,旋转后的车牌图像如图4a所示,再经过Y方向Radon变换,对上述旋转后的车牌图像再进行校正,得到校正车牌图像图如图4b所示。For the license plate image as shown in FIG. 1, the license plate image collected by the image acquisition device, the position of the character detected by the MSER is as shown by the square formed by each character in FIG. 3, and the straight line 301 in FIG. 3 is the license plate. The line connecting the coordinates of the center point of all the characters in the image is obtained by calculating the slope of the line 301 to obtain a tilt angle of the license plate image of 40 degrees, and setting the angle range to be searched to be 15 degrees, and the tilt angle range of the license plate image is 25 Degree to 55 degrees. Then, according to the tilt angle range of the license plate image, the tilted license plate is rotated by the X-direction Radon transform, and the rotated license plate image is shown in FIG. 4a, and then the Y-direction Radon transform is performed to correct the rotated license plate image. A corrected license plate image is shown in Figure 4b.
如图4b所示,由于车牌图像的倾斜导致旋转校正后得到的校正车牌图像中靠近图像采集设备侧的字符偏大,远离图像采集设备侧的字符偏小,针对图4b存在的情况,对图4b对应的MSER框位置的图像,如图5a所示,提取图中点a、b、c、d的坐标,点b、c可以基于末尾字符的MSER框位置获取,点a、d可以基于首字符的MSER框位置获取,设定a、b、c、d四点的坐标分别为(x0,y0)(x1,y1)(x2,y2)(x3,y3),变换后得到的点坐标分别为(x0-b,y1)(x1,y1)(x2,y2)(x3-b,y2),b为修正数值,可以根据对图像期望达到的校正后的图像的效果确定,进而可以通过通用的透视变换公式(1)得到映射 关系,对图5a进行校正得到如图5b所示的字符等高的变换车牌图像。对于如图5b所示的字符等高的变换车牌图像,可以将字符等高的变换车牌图像中的每个字符送入BP网络进行识别,由于在上述变换的过程中,字符可能会发生畸变,可以通过MSER结果对模板匹配结果的方式进行校正。As shown in FIG. 4b, due to the tilt of the license plate image, the characters in the corrected license plate image obtained after the rotation correction are closer to the image acquisition device side, and the characters away from the image acquisition device side are smaller. For the situation existing in FIG. 4b, the figure is 4b corresponds to the image of the MSER frame position, as shown in Figure 5a, extract the coordinates of points a, b, c, d in the figure, points b, c can be obtained based on the MSER frame position of the last character, points a, d can be based on the first The position of the MSER frame of the character is obtained. The coordinates of the four points a, b, c, and d are respectively (x0, y0) (x1, y1) (x2, y2) (x3, y3), and the coordinates of the points obtained after the transformation are respectively For (x0-b, y1)(x1, y1)(x2, y2)(x3-b, y2), b is a correction value, which can be determined according to the effect of the corrected image that the image is expected to achieve, and The perspective transformation formula (1) obtains a mapping relationship, and Fig. 5a is corrected to obtain a converted license plate image of the character contour as shown in Fig. 5b. For the converted license plate image of the character contour as shown in FIG. 5b, each character in the converted license plate image of the same character height can be sent to the BP network for recognition, since characters may be distorted during the above transformation process, The way the template matches the results can be corrected by the MSER results.
与相关技术相比,本方案中,通过预设图像分割算法,得到车牌图像中每个字符的位置,并且根据每个字符的位置确定车牌图像的倾斜角度范围,按照该倾斜角度范围,对车牌图像进行旋转矫正,并通过透视变换进行坐标变换,得到字符等高的车牌图像,最后通过对每个字符进行识别,从而减少参与运算的图像数量,提高车牌识别的运算效率,并且通过预设图像分割算法提高了字符分割的准确性、通过透视变换有效解决字符畸变的影响,从而提高了车牌识别的成功率。Compared with the related art, in the solution, the position of each character in the license plate image is obtained by a preset image segmentation algorithm, and the tilt angle range of the license plate image is determined according to the position of each character, and the license plate is used according to the tilt angle range. The image is rotated and corrected, and the coordinate transformation is performed by perspective transformation to obtain the license plate image with the same character height. Finally, each character is recognized, thereby reducing the number of images participating in the operation, improving the operation efficiency of the license plate recognition, and adopting the preset image. The segmentation algorithm improves the accuracy of character segmentation and effectively solves the influence of character distortion through perspective transformation, thereby improving the success rate of license plate recognition.
相应于上述实施例,本申请实施例提供了一种车牌识别装置,如图6所示,所述装置可以包括:Corresponding to the above embodiment, the embodiment of the present application provides a license plate recognition device. As shown in FIG. 6, the device may include:
字符位置确定模块610,用于通过预设图像分割算法,对采集的车牌图像中的字符进行检测,确定所述车牌图像中每个字符的位置;a character position determining module 610, configured to detect, by using a preset image segmentation algorithm, characters in the collected license plate image to determine a position of each character in the license plate image;
车牌倾斜角度确定模块620,用于根据所述车牌图像中每个字符的位置,确定所述车牌图像的倾斜角度范围;a license plate tilt angle determining module 620, configured to determine a tilt angle range of the license plate image according to a position of each character in the license plate image;
车牌旋转校正模块630,用于按照所述倾斜角度范围,对所述车牌图像进行旋转校正,得到校正车牌图像;a license plate rotation correction module 630, configured to perform rotation correction on the license plate image according to the tilt angle range to obtain a corrected license plate image;
车牌畸变校正模块640,用于获取所述校正车牌图像的顶点坐标,通过透视变换对所述顶点坐标进行变换,得到字符等高的变换车牌图像;a license plate distortion correction module 640, configured to acquire vertex coordinates of the corrected license plate image, and transform the vertex coordinates by perspective transformation to obtain a converted license plate image with a character contour;
车牌字符识别模块650,用于对所述变换车牌图像中的每个字符进行识别,得到识别后的车牌。The license plate character recognition module 650 is configured to identify each character in the converted license plate image to obtain the recognized license plate.
应用本实施例,通过预设图像分割算法,得到车牌图像中每个字符的位置,并且根据每个字符的位置确定车牌图像的倾斜角度范围,按照该倾斜角度范围,对车牌图像进行旋转矫正,并通过透视变换进行坐标变换,得到字 符等高的车牌图像,最后通过对每个字符进行识别,从而减少参与运算的图像数量,提高车牌识别的运算效率,并且通过预设图像分割算法提高了字符分割的准确性、通过透视变换有效解决字符畸变的影响,从而提高了车牌识别的成功率。Applying the embodiment, the position of each character in the license plate image is obtained by preset image segmentation algorithm, and the tilt angle range of the license plate image is determined according to the position of each character, and the license plate image is rotated and corrected according to the tilt angle range. Through the perspective transformation, the coordinate transformation is carried out to obtain the license plate image with the same character height. Finally, each character is identified, thereby reducing the number of images participating in the operation, improving the operation efficiency of the license plate recognition, and improving the characters by the preset image segmentation algorithm. The accuracy of segmentation and the effect of character distortion are effectively solved by perspective transformation, thereby improving the success rate of license plate recognition.
可选的,所述预设图像分割算法可以包括:最大稳定极值区域MSER图像分割算法;Optionally, the preset image segmentation algorithm may include: a maximum stable extreme value region MSER image segmentation algorithm;
所述字符位置确定模块610,具体可以用于:The character position determining module 610 can be specifically configured to:
通过所述MSER图像分割算法,对采集的车牌图像中的字符进行检测,得到每个字符的MSER框位置;The MSER image segmentation algorithm is used to detect characters in the collected license plate image to obtain the MSER frame position of each character;
将每个字符的MSER框位置确定为对应字符的位置。The position of the MSER box of each character is determined as the position of the corresponding character.
可选的,所述车牌倾斜角度确定模块620,具体可以用于:Optionally, the license plate tilt angle determining module 620 can be specifically configured to:
根据所述车牌图像中每个字符的位置,确定所述车牌图像中每个字符的中心点坐标;Determining a center point coordinate of each character in the license plate image according to a position of each character in the license plate image;
根据每个字符的中心点坐标,通过最小二乘法,确定所述车牌图像相较于水平方向的斜率;Determining a slope of the license plate image compared to a horizontal direction by a least squares method according to a center point coordinate of each character;
根据所述斜率,确定所述车牌图像相较于水平方向的偏移角度;Determining, according to the slope, an offset angle of the license plate image compared to a horizontal direction;
根据所述偏移角度及预设搜索角度范围,确定所述车牌图像的倾斜角度范围。Determining a range of tilt angles of the license plate image according to the offset angle and a preset search angle range.
可选的,所述车牌旋转校正模块630,具体可以用于:Optionally, the license plate rotation correction module 630 can be specifically configured to:
按照所述倾斜角度范围,对所述车牌图像进行Radon变换,得到所述车牌图像的水平倾斜角度;Performing a Radon transform on the license plate image according to the tilt angle range to obtain a horizontal tilt angle of the license plate image;
根据所述水平倾斜角度,将所述车牌图像进行旋转校正,得到水平倾斜校正后的车牌图像;Performing rotation correction on the license plate image according to the horizontal tilt angle to obtain a license plate image after horizontal tilt correction;
按照所述倾斜角度范围,对所述水平倾斜校正后的车牌图像进行Radon变换,得到所述水平倾斜校正后的车牌图像的垂直倾斜角度;Performing a Radon transform on the license plate image after the horizontal tilt correction according to the tilt angle range, to obtain a vertical tilt angle of the license plate image after the horizontal tilt correction;
根据所述垂直倾斜角度,对所述水平倾斜校正后的车牌图像进行校正, 得到校正车牌图像。Correcting the horizontally corrected license plate image according to the vertical tilt angle to obtain a corrected license plate image.
可选的,所述车牌畸变校正模块640,具体可以用于:Optionally, the license plate distortion correction module 640 can be specifically configured to:
根据所述校正车牌图像的首字符的MSER框位置及末尾字符的MSER框位置,获取得到所述校正车牌图像的顶点坐标;Obtaining vertex coordinates of the corrected license plate image according to the position of the MSER frame of the first character of the corrected license plate image and the position of the MSER frame of the last character;
对所述顶点坐标进行变换,得到字符等高的顶点变换坐标;Transforming the vertex coordinates to obtain vertex transformation coordinates of a character contour;
对所述顶点变换坐标进行计算,得到变换参数;Calculating the vertex transformation coordinates to obtain transformation parameters;
根据所述透视变换通用公式及所述变换参数,得到所述顶点坐标与所述顶点变换坐标的映射关系;Obtaining a mapping relationship between the vertex coordinates and the vertex transformation coordinates according to the perspective transformation general formula and the transformation parameters;
根据所述映射关系及所述校正车牌图像,得到变换车牌图像。A converted license plate image is obtained based on the mapping relationship and the corrected license plate image.
可选的,所述车牌字符识别模块650,具体可以用于:Optionally, the license plate character recognition module 650 is specifically configured to:
利用多个预设车牌模板对所述变换车牌图像进行字符位置匹配,确定所述变换车牌图像中与预设车牌模板相匹配的字符的位置;Performing character position matching on the converted license plate image by using a plurality of preset license plate templates, and determining a position of a character in the converted license plate image that matches a preset license plate template;
分别将每个位置上的字符输入预设神经网络进行模板匹配,得到每个字符的模板匹配置信度;The characters in each position are respectively input into a preset neural network for template matching, and the template matching confidence of each character is obtained;
获取所述变换车牌图像中每个字符的MSER框位置对应的MSER结果置信度;Obtaining a confidence level of the MSER result corresponding to the position of the MSER frame of each character in the converted license plate image;
依次比较每个字符的模板匹配置信度与该字符对应MSER框位置的MSER结果置信度,并在所述MSER结果置信度大于所述模板匹配置信度时,更新该位置的字符为所述MSER结果对应MSER框位置的字符;The template matching confidence of each character is compared with the MSER result confidence of the MSER frame position corresponding to the character, and when the MSER result confidence is greater than the template matching confidence, the character of the location is updated to be the MSER result. The character corresponding to the position of the MSER box;
确定更新后的变换车牌图像为识别后的车牌。The updated converted license plate image is determined to be the recognized license plate.
本申请实施例的车牌识别装置为应用车牌识别方法的装置,则上述车牌识别方法的所有实施例均适用于该装置,且均能达到相同或相似的有益效果。The license plate recognition device of the embodiment of the present application is a device for applying the license plate recognition method, and all the embodiments of the license plate recognition method are applicable to the device, and both can achieve the same or similar beneficial effects.
相应于上述实施例,本申请实施例提供了一种车牌识别系统,如图7所 示,所述系统可以包括:Corresponding to the above embodiment, the embodiment of the present application provides a license plate recognition system. As shown in FIG. 7, the system may include:
图像采集设备710,用于对车辆进行拍摄,得到车牌图像;An image capturing device 710 is configured to capture a vehicle to obtain a license plate image;
存储器720,用于存放计算机程序;a memory 720, configured to store a computer program;
处理器730,用于通过预设图像分割算法,对所述图像采集设备710采集的车牌图像中的字符进行检测,确定所述车牌图像中每个字符的位置;根据所述车牌图像中每个字符的位置,确定所述车牌图像的倾斜角度范围;按照所述倾斜角度范围,对所述车牌图像进行旋转校正,得到校正车牌图像;获取所述校正车牌图像的顶点坐标,通过透视变换对所述顶点坐标进行变换,得到字符等高的变换车牌图像;对所述变换车牌图像中的每个字符进行识别,得到识别后的车牌。The processor 730 is configured to detect, by using a preset image segmentation algorithm, characters in the license plate image collected by the image capturing device 710, and determine a position of each character in the license plate image; according to each of the license plate images a position of the character, determining a range of the tilt angle of the license plate image; performing rotation correction on the license plate image according to the tilt angle range to obtain a corrected license plate image; acquiring vertex coordinates of the corrected license plate image, and performing perspective transformation on the The vertex coordinates are transformed to obtain a converted license plate image having the same character height; each character in the converted license plate image is identified to obtain the recognized license plate.
应用本实施例,通过预设图像分割算法,得到车牌图像中每个字符的位置,并且根据每个字符的位置确定车牌图像的倾斜角度范围,按照该倾斜角度范围,对车牌图像进行旋转矫正,并通过透视变换进行坐标变换,得到字符等高的车牌图像,最后通过对每个字符进行识别,从而减少参与运算的图像数量,提高车牌识别的运算效率,并且通过预设图像分割算法提高了字符分割的准确性、通过透视变换有效解决字符畸变的影响,从而提高了车牌识别的成功率。Applying the embodiment, the position of each character in the license plate image is obtained by preset image segmentation algorithm, and the tilt angle range of the license plate image is determined according to the position of each character, and the license plate image is rotated and corrected according to the tilt angle range. Through the perspective transformation, the coordinate transformation is carried out to obtain the license plate image with the same character height. Finally, each character is identified, thereby reducing the number of images participating in the operation, improving the operation efficiency of the license plate recognition, and improving the characters by the preset image segmentation algorithm. The accuracy of segmentation and the effect of character distortion are effectively solved by perspective transformation, thereby improving the success rate of license plate recognition.
可选的,所述预设图像分割算法包括:最大稳定极值区域MSER图像分割算法;Optionally, the preset image segmentation algorithm comprises: a maximum stable extreme value region MSER image segmentation algorithm;
所述处理器730,具体可以用于:The processor 730 can be specifically configured to:
通过所述MSER图像分割算法,对采集的车牌图像中的字符进行检测,得到每个字符的MSER框位置;The MSER image segmentation algorithm is used to detect characters in the collected license plate image to obtain the MSER frame position of each character;
将每个字符的MSER框位置确定为对应字符的位置。The position of the MSER box of each character is determined as the position of the corresponding character.
所述处理器730,具体还可以用于:The processor 730 is specifically configured to:
根据所述车牌图像中每个字符的位置,确定所述车牌图像中每个字符的中心点坐标;Determining a center point coordinate of each character in the license plate image according to a position of each character in the license plate image;
根据每个字符的中心点坐标,通过最小二乘法,确定所述车牌图像相较 于水平方向的斜率;Determining the slope of the license plate image relative to the horizontal direction by a least squares method according to the center point coordinates of each character;
根据所述斜率,确定所述车牌图像相较于水平方向的偏移角度;Determining, according to the slope, an offset angle of the license plate image compared to a horizontal direction;
根据所述偏移角度及预设搜索角度范围,确定所述车牌图像的倾斜角度范围。Determining a range of tilt angles of the license plate image according to the offset angle and a preset search angle range.
所述处理器730,具体还可以用于:The processor 730 is specifically configured to:
按照所述倾斜角度范围,对所述车牌图像进行Radon变换,得到所述车牌图像的水平倾斜角度;Performing a Radon transform on the license plate image according to the tilt angle range to obtain a horizontal tilt angle of the license plate image;
根据所述水平倾斜角度,将所述车牌图像进行旋转校正,得到水平倾斜校正后的车牌图像;Performing rotation correction on the license plate image according to the horizontal tilt angle to obtain a license plate image after horizontal tilt correction;
按照所述倾斜角度范围,对所述水平倾斜校正后的车牌图像进行Radon变换,得到所述水平倾斜校正后的车牌图像的垂直倾斜角度;Performing a Radon transform on the license plate image after the horizontal tilt correction according to the tilt angle range, to obtain a vertical tilt angle of the license plate image after the horizontal tilt correction;
根据所述垂直倾斜角度,对所述水平倾斜校正后的车牌图像进行校正,得到校正车牌图像。Correcting the horizontal tilt corrected license plate image according to the vertical tilt angle to obtain a corrected license plate image.
所述处理器730,具体还可以用于:The processor 730 is specifically configured to:
根据所述校正车牌图像的首字符的MSER框位置及末尾字符的MSER框位置,获取得到所述校正车牌图像的顶点坐标;Obtaining vertex coordinates of the corrected license plate image according to the position of the MSER frame of the first character of the corrected license plate image and the position of the MSER frame of the last character;
对所述顶点坐标进行变换,得到字符等高的顶点变换坐标;Transforming the vertex coordinates to obtain vertex transformation coordinates of a character contour;
对所述顶点变换坐标进行计算,得到变换参数;Calculating the vertex transformation coordinates to obtain transformation parameters;
根据所述透视变换通用公式及所述变换参数,得到所述顶点坐标与所述顶点变换坐标的映射关系;Obtaining a mapping relationship between the vertex coordinates and the vertex transformation coordinates according to the perspective transformation general formula and the transformation parameters;
根据所述映射关系及所述校正车牌图像,得到变换车牌图像。A converted license plate image is obtained based on the mapping relationship and the corrected license plate image.
所述处理器730,具体还可以用于:The processor 730 is specifically configured to:
利用多个预设车牌模板对所述变换车牌图像进行字符位置匹配,确定所述变换车牌图像中与预设车牌模板相匹配的字符的位置;Performing character position matching on the converted license plate image by using a plurality of preset license plate templates, and determining a position of a character in the converted license plate image that matches a preset license plate template;
分别将每个位置上的字符输入预设神经网络进行模板匹配,得到每个字 符的模板匹配置信度;The characters in each position are respectively input into a preset neural network for template matching, and the template matching confidence of each character is obtained;
获取所述变换车牌图像中每个字符的MSER框位置对应的MSER结果置信度;Obtaining a confidence level of the MSER result corresponding to the position of the MSER frame of each character in the converted license plate image;
依次比较每个字符的模板匹配置信度与该字符对应MSER框位置的MSER结果置信度,并在所述MSER结果置信度大于所述模板匹配置信度时,更新该位置的字符为所述MSER结果对应MSER框位置的字符;The template matching confidence of each character is compared with the MSER result confidence of the MSER frame position corresponding to the character, and when the MSER result confidence is greater than the template matching confidence, the character of the location is updated to be the MSER result. The character corresponding to the position of the MSER box;
确定更新后的变换车牌图像为识别后的车牌。The updated converted license plate image is determined to be the recognized license plate.
本申请实施例的车牌识别系统为应用车牌识别方法及装置的系统,则上述车牌识别方法及装置的所有实施例均适用于该系统,且均能达到相同或相似的有益效果。The license plate recognition system of the embodiment of the present application is a system for applying the license plate recognition method and device, and all the embodiments of the license plate recognition method and device are applicable to the system, and both can achieve the same or similar beneficial effects.
另外,相应于上述实施例所提供的车牌识别方法,本申请实施例提供了一种存储介质,用于存储可执行代码,所述可执行代码用于在运行时执行:本申请实施例所提供的车牌识别方法;具体的,所述车牌识别方法,包括:In addition, corresponding to the license plate recognition method provided by the foregoing embodiment, the embodiment of the present application provides a storage medium for storing executable code, which is used for execution at runtime: provided by the embodiment of the present application. a license plate recognition method; specifically, the license plate recognition method includes:
通过预设图像分割算法,对采集的车牌图像中的字符进行检测,确定所述车牌图像中每个字符的位置;The characters in the collected license plate image are detected by a preset image segmentation algorithm to determine the position of each character in the license plate image;
根据所述车牌图像中每个字符的位置,确定所述车牌图像的倾斜角度范围;Determining a range of tilt angles of the license plate image according to a position of each character in the license plate image;
按照所述倾斜角度范围,对所述车牌图像进行旋转校正,得到校正车牌图像;Performing rotation correction on the license plate image according to the tilt angle range to obtain a corrected license plate image;
获取所述校正车牌图像的顶点坐标,通过透视变换对所述顶点坐标进行变换,得到字符等高的变换车牌图像;Obtaining a vertex coordinate of the corrected license plate image, and transforming the vertex coordinates by a perspective transformation to obtain a converted license plate image with a character contour;
对所述变换车牌图像中的每个字符进行识别,得到识别后的车牌。Each character in the converted license plate image is identified to obtain a recognized license plate.
可选的,所述预设图像分割算法包括:最大稳定极值区域MSER图像分割算法;Optionally, the preset image segmentation algorithm comprises: a maximum stable extreme value region MSER image segmentation algorithm;
所述通过预设图像分割算法,对采集的车牌图像中的字符进行检测,确 定所述车牌图像中每个字符的位置,包括:And detecting, by using a preset image segmentation algorithm, characters in the collected license plate image to determine a position of each character in the license plate image, including:
通过所述MSER图像分割算法,对采集的车牌图像中的字符进行检测,得到每个字符的MSER框位置;The MSER image segmentation algorithm is used to detect characters in the collected license plate image to obtain the MSER frame position of each character;
将每个字符的MSER框位置确定为对应字符的位置。The position of the MSER box of each character is determined as the position of the corresponding character.
可选的,所述根据所述车牌图像中每个字符的位置,确定所述车牌图像的倾斜角度范围,包括:Optionally, determining, according to a position of each character in the license plate image, a range of tilt angles of the license plate image, including:
根据所述车牌图像中每个字符的位置,确定所述车牌图像中每个字符的中心点坐标;Determining a center point coordinate of each character in the license plate image according to a position of each character in the license plate image;
根据每个字符的中心点坐标,通过最小二乘法,确定所述车牌图像相较于水平方向的斜率;Determining a slope of the license plate image compared to a horizontal direction by a least squares method according to a center point coordinate of each character;
根据所述斜率,确定所述车牌图像相较于水平方向的偏移角度;Determining, according to the slope, an offset angle of the license plate image compared to a horizontal direction;
根据所述偏移角度及预设搜索角度范围,确定所述车牌图像的倾斜角度范围。Determining a range of tilt angles of the license plate image according to the offset angle and a preset search angle range.
可选的,所述按照所述倾斜角度范围,对所述车牌图像进行旋转校正,得到校正车牌图像,包括:Optionally, the performing the rotation correction on the license plate image according to the tilt angle range to obtain a corrected license plate image includes:
按照所述倾斜角度范围,对所述车牌图像进行Radon变换,得到所述车牌图像的水平倾斜角度;Performing a Radon transform on the license plate image according to the tilt angle range to obtain a horizontal tilt angle of the license plate image;
根据所述水平倾斜角度,将所述车牌图像进行旋转校正,得到水平倾斜校正后的车牌图像;Performing rotation correction on the license plate image according to the horizontal tilt angle to obtain a license plate image after horizontal tilt correction;
按照所述倾斜角度范围,对所述水平倾斜校正后的车牌图像进行Radon变换,得到所述水平倾斜校正后的车牌图像的垂直倾斜角度;Performing a Radon transform on the license plate image after the horizontal tilt correction according to the tilt angle range, to obtain a vertical tilt angle of the license plate image after the horizontal tilt correction;
根据所述垂直倾斜角度,对所述水平倾斜校正后的车牌图像进行校正,得到校正车牌图像。Correcting the horizontal tilt corrected license plate image according to the vertical tilt angle to obtain a corrected license plate image.
可选的,所述获取所述校正车牌图像的顶点坐标,通过透视变换对所述顶点坐标进行变换,得到字符等高的变换车牌图像,包括:Optionally, the acquiring the coordinates of the vertex of the corrected license plate image, transforming the coordinates of the vertex by perspective transformation, and obtaining a converted license plate image with the same character height, including:
根据所述校正车牌图像的首字符的MSER框位置及末尾字符的MSER框 位置,获取得到所述校正车牌图像的顶点坐标;Obtaining vertex coordinates of the corrected license plate image according to the MSER frame position of the first character of the corrected license plate image and the MSER frame position of the last character;
对所述顶点坐标进行变换,得到字符等高的顶点变换坐标;Transforming the vertex coordinates to obtain vertex transformation coordinates of a character contour;
对所述顶点变换坐标进行计算,得到变换参数;Calculating the vertex transformation coordinates to obtain transformation parameters;
根据所述透视变换通用公式及所述变换参数,得到所述顶点坐标与所述顶点变换坐标的映射关系;Obtaining a mapping relationship between the vertex coordinates and the vertex transformation coordinates according to the perspective transformation general formula and the transformation parameters;
根据所述映射关系及所述校正车牌图像,得到变换车牌图像。A converted license plate image is obtained based on the mapping relationship and the corrected license plate image.
可选的,所述对所述变换车牌图像中的每个字符进行识别,得到识别后的车牌,包括:Optionally, the identifying each character in the converted license plate image to obtain the recognized license plate includes:
利用多个预设车牌模板对所述变换车牌图像进行字符位置匹配,确定所述变换车牌图像中与预设车牌模板相匹配的字符的位置;Performing character position matching on the converted license plate image by using a plurality of preset license plate templates, and determining a position of a character in the converted license plate image that matches a preset license plate template;
分别将每个位置上的字符输入预设神经网络进行模板匹配,得到每个字符的模板匹配置信度;The characters in each position are respectively input into a preset neural network for template matching, and the template matching confidence of each character is obtained;
获取所述变换车牌图像中每个字符的MSER框位置对应的MSER结果置信度;Obtaining a confidence level of the MSER result corresponding to the position of the MSER frame of each character in the converted license plate image;
依次比较每个字符的模板匹配置信度与该字符对应MSER框位置的MSER结果置信度,并在所述MSER结果置信度大于所述模板匹配置信度时,更新该位置的字符为所述MSER结果对应MSER框位置的字符;The template matching confidence of each character is compared with the MSER result confidence of the MSER frame position corresponding to the character, and when the MSER result confidence is greater than the template matching confidence, the character of the location is updated to be the MSER result. The character corresponding to the position of the MSER box;
确定更新后的变换车牌图像为识别后的车牌。The updated converted license plate image is determined to be the recognized license plate.
本实施例中,存储介质存储有在运行时执行本申请实施例所提供的车牌识别方法的应用程序,因此能够实现:通过预设图像分割算法,得到车牌图像中每个字符的位置,并且根据每个字符的位置确定车牌图像的倾斜角度范围,按照该倾斜角度范围,对车牌图像进行旋转矫正,并通过透视变换进行坐标变换,得到字符等高的车牌图像,最后通过对每个字符进行识别,从而减少参与运算的图像数量,提高车牌识别的运算效率,并且通过预设图像分割算法提高了字符分割的准确性、通过透视变换有效解决字符畸变的影响,从而提高了车牌识别的成功率。In this embodiment, the storage medium stores an application program that executes the license plate recognition method provided by the embodiment of the present application at runtime, and thus can realize: obtaining a position of each character in the license plate image by using a preset image segmentation algorithm, and according to The position of each character determines the range of the tilt angle of the license plate image, according to the tilt angle range, the license plate image is rotated and corrected, and coordinate transformation is performed through perspective transformation to obtain a license plate image with the same character height, and finally each character is identified. Therefore, the number of images participating in the operation is reduced, the operation efficiency of the license plate recognition is improved, and the accuracy of the character segmentation is improved by the preset image segmentation algorithm, and the influence of the character distortion is effectively solved by the perspective transformation, thereby improving the success rate of the license plate recognition.
另外,相应于上述实施例所提供的车牌识别方法,本申请实施例提供了一种应用程序,用于在运行时执行:本申请实施例所提供的上述车牌识别方法步骤。In addition, corresponding to the license plate recognition method provided by the foregoing embodiment, the embodiment of the present application provides an application program for performing the foregoing steps of the license plate recognition method provided by the embodiment of the present application.
本实施例中,应用程序在运行时执行本申请实施例所提供的车牌识别方法,因此能够实现:通过预设图像分割算法,得到车牌图像中每个字符的位置,并且根据每个字符的位置确定车牌图像的倾斜角度范围,按照该倾斜角度范围,对车牌图像进行旋转矫正,并通过透视变换进行坐标变换,得到字符等高的车牌图像,最后通过对每个字符进行识别,从而减少参与运算的图像数量,提高车牌识别的运算效率,并且通过预设图像分割算法提高了字符分割的准确性、通过透视变换有效解决字符畸变的影响,从而提高了车牌识别的成功率。In this embodiment, the application performs the license plate recognition method provided by the embodiment of the present application at runtime, so that the position of each character in the license plate image can be obtained by using a preset image segmentation algorithm, and according to the position of each character. Determining the range of the tilt angle of the license plate image, rotating the license plate image according to the tilt angle range, and performing coordinate transformation by perspective transformation to obtain a license plate image with the same character height, and finally identifying each character to reduce the participation operation The number of images improves the computational efficiency of license plate recognition, and improves the accuracy of character segmentation through preset image segmentation algorithm, and effectively solves the influence of character distortion through perspective transformation, thereby improving the success rate of license plate recognition.
对于应用程序以及存储介质实施例而言,由于其所涉及的方法内容基本相似于前述的方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。For the application and the storage medium embodiment, since the method content involved is basically similar to the foregoing method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply such entities or operations. There is any such actual relationship or order between them. Furthermore, the term "comprises" or "comprises" or "comprises" or any other variations thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a plurality of elements includes not only those elements but also Other elements, or elements that are inherent to such a process, method, item, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in the present specification are described in a related manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., which are made within the spirit and principles of the present application, should be included in the present application. Within the scope of protection.

Claims (15)

  1. 一种车牌识别方法,其特征在于,所述方法包括:A license plate recognition method, characterized in that the method comprises:
    通过预设图像分割算法,对采集的车牌图像中的字符进行检测,确定所述车牌图像中每个字符的位置;The characters in the collected license plate image are detected by a preset image segmentation algorithm to determine the position of each character in the license plate image;
    根据所述车牌图像中每个字符的位置,确定所述车牌图像的倾斜角度范围;Determining a range of tilt angles of the license plate image according to a position of each character in the license plate image;
    按照所述倾斜角度范围,对所述车牌图像进行旋转校正,得到校正车牌图像;Performing rotation correction on the license plate image according to the tilt angle range to obtain a corrected license plate image;
    获取所述校正车牌图像的顶点坐标,通过透视变换对所述顶点坐标进行变换,得到字符等高的变换车牌图像;Obtaining a vertex coordinate of the corrected license plate image, and transforming the vertex coordinates by a perspective transformation to obtain a converted license plate image with a character contour;
    对所述变换车牌图像中的每个字符进行识别,得到识别后的车牌。Each character in the converted license plate image is identified to obtain a recognized license plate.
  2. 根据权利要求1所述的车牌识别方法,其特征在于,所述预设图像分割算法包括:最大稳定极值区域MSER图像分割算法;The license plate recognition method according to claim 1, wherein the preset image segmentation algorithm comprises: a maximum stable extreme value region MSER image segmentation algorithm;
    所述通过预设图像分割算法,对采集的车牌图像中的字符进行检测,确定所述车牌图像中每个字符的位置,包括:The determining, by using a preset image segmentation algorithm, the characters in the collected license plate image to determine the position of each character in the license plate image, including:
    通过所述MSER图像分割算法,对采集的车牌图像中的字符进行检测,得到每个字符的MSER框位置;The MSER image segmentation algorithm is used to detect characters in the collected license plate image to obtain the MSER frame position of each character;
    将每个字符的MSER框位置确定为对应字符的位置。The position of the MSER box of each character is determined as the position of the corresponding character.
  3. 根据权利要求1或2所述的车牌识别方法,其特征在于,所述根据所述车牌图像中每个字符的位置,确定所述车牌图像的倾斜角度范围,包括:The license plate recognition method according to claim 1 or 2, wherein the determining the tilt angle range of the license plate image according to the position of each character in the license plate image comprises:
    根据所述车牌图像中每个字符的位置,确定所述车牌图像中每个字符的中心点坐标;Determining a center point coordinate of each character in the license plate image according to a position of each character in the license plate image;
    根据每个字符的中心点坐标,通过最小二乘法,确定所述车牌图像相较于水平方向的斜率;Determining a slope of the license plate image compared to a horizontal direction by a least squares method according to a center point coordinate of each character;
    根据所述斜率,确定所述车牌图像相较于水平方向的偏移角度;Determining, according to the slope, an offset angle of the license plate image compared to a horizontal direction;
    根据所述偏移角度及预设搜索角度范围,确定所述车牌图像的倾斜角度 范围。And determining a range of the tilt angle of the license plate image according to the offset angle and the preset search angle range.
  4. 根据权利要求1或2所述的车牌识别方法,其特征在于,所述按照所述倾斜角度范围,对所述车牌图像进行旋转校正,得到校正车牌图像,包括:The license plate recognition method according to claim 1 or 2, wherein the correcting the license plate image according to the tilt angle range to obtain a corrected license plate image comprises:
    按照所述倾斜角度范围,对所述车牌图像进行Radon变换,得到所述车牌图像的水平倾斜角度;Performing a Radon transform on the license plate image according to the tilt angle range to obtain a horizontal tilt angle of the license plate image;
    根据所述水平倾斜角度,将所述车牌图像进行旋转校正,得到水平倾斜校正后的车牌图像;Performing rotation correction on the license plate image according to the horizontal tilt angle to obtain a license plate image after horizontal tilt correction;
    按照所述倾斜角度范围,对所述水平倾斜校正后的车牌图像进行Radon变换,得到所述水平倾斜校正后的车牌图像的垂直倾斜角度;Performing a Radon transform on the license plate image after the horizontal tilt correction according to the tilt angle range, to obtain a vertical tilt angle of the license plate image after the horizontal tilt correction;
    根据所述垂直倾斜角度,对所述水平倾斜校正后的车牌图像进行校正,得到校正车牌图像。Correcting the horizontal tilt corrected license plate image according to the vertical tilt angle to obtain a corrected license plate image.
  5. 根据权利要求2所述的车牌识别方法,其特征在于,所述获取所述校正车牌图像的顶点坐标,通过透视变换对所述顶点坐标进行变换,得到字符等高的变换车牌图像,包括:The license plate recognition method according to claim 2, wherein the acquiring the vertex coordinates of the corrected license plate image, and transforming the vertex coordinates by perspective transformation to obtain a converted license plate image having the same character height, comprising:
    根据所述校正车牌图像的首字符的MSER框位置及末尾字符的MSER框位置,获取得到所述校正车牌图像的顶点坐标;Obtaining vertex coordinates of the corrected license plate image according to the position of the MSER frame of the first character of the corrected license plate image and the position of the MSER frame of the last character;
    对所述顶点坐标进行变换,得到字符等高的顶点变换坐标;Transforming the vertex coordinates to obtain vertex transformation coordinates of a character contour;
    对所述顶点变换坐标进行计算,得到变换参数;Calculating the vertex transformation coordinates to obtain transformation parameters;
    根据所述透视变换通用公式及所述变换参数,得到所述顶点坐标与所述顶点变换坐标的映射关系;Obtaining a mapping relationship between the vertex coordinates and the vertex transformation coordinates according to the perspective transformation general formula and the transformation parameters;
    根据所述映射关系及所述校正车牌图像,得到变换车牌图像。A converted license plate image is obtained based on the mapping relationship and the corrected license plate image.
  6. 根据权利要求2所述的车牌识别方法,其特征在于,所述对所述变换车牌图像中的每个字符进行识别,得到识别后的车牌,包括:The license plate recognition method according to claim 2, wherein the recognizing each character in the converted license plate image to obtain the recognized license plate comprises:
    利用多个预设车牌模板对所述变换车牌图像进行字符位置匹配,确定所述变换车牌图像中与预设车牌模板相匹配的字符的位置;Performing character position matching on the converted license plate image by using a plurality of preset license plate templates, and determining a position of a character in the converted license plate image that matches a preset license plate template;
    分别将每个位置上的字符输入预设神经网络进行模板匹配,得到每个字 符的模板匹配置信度;The characters in each position are respectively input into a preset neural network for template matching, and the template matching confidence of each character is obtained;
    获取所述变换车牌图像中每个字符的MSER框位置对应的MSER结果置信度;Obtaining a confidence level of the MSER result corresponding to the position of the MSER frame of each character in the converted license plate image;
    依次比较每个字符的模板匹配置信度与该字符对应MSER框位置的MSER结果置信度,并在所述MSER结果置信度大于所述模板匹配置信度时,更新该位置的字符为所述MSER结果对应MSER框位置的字符;The template matching confidence of each character is compared with the MSER result confidence of the MSER frame position corresponding to the character, and when the MSER result confidence is greater than the template matching confidence, the character of the location is updated to be the MSER result. The character corresponding to the position of the MSER box;
    确定更新后的变换车牌图像为识别后的车牌。The updated converted license plate image is determined to be the recognized license plate.
  7. 一种车牌识别装置,其特征在于,所述装置包括:A license plate recognition device, characterized in that the device comprises:
    字符位置确定模块,用于通过预设图像分割算法,对采集的车牌图像中的字符进行检测,确定所述车牌图像中每个字符的位置;a character position determining module, configured to detect, by using a preset image segmentation algorithm, characters in the collected license plate image to determine a position of each character in the license plate image;
    车牌倾斜角度确定模块,用于根据所述车牌图像中每个字符的位置,确定所述车牌图像的倾斜角度范围;a license plate tilt angle determining module, configured to determine a tilt angle range of the license plate image according to a position of each character in the license plate image;
    车牌旋转校正模块,用于按照所述倾斜角度范围,对所述车牌图像进行旋转校正,得到校正车牌图像;a license plate rotation correction module, configured to perform rotation correction on the license plate image according to the tilt angle range to obtain a corrected license plate image;
    车牌畸变校正模块,用于获取所述校正车牌图像的顶点坐标,通过透视变换对所述顶点坐标进行变换,得到字符等高的变换车牌图像;a license plate distortion correction module, configured to acquire vertex coordinates of the corrected license plate image, and transform the vertex coordinates by perspective transformation to obtain a converted license plate image with a character contour;
    车牌字符识别模块,用于对所述变换车牌图像中的每个字符进行识别,得到识别后的车牌。The license plate character recognition module is configured to identify each character in the converted license plate image to obtain the recognized license plate.
  8. 根据权利要求7所述的车牌识别装置,其特征在于,所述预设图像分割算法包括:最大稳定极值区域MSER图像分割算法;The license plate recognition device according to claim 7, wherein the preset image segmentation algorithm comprises: a maximum stable extreme value region MSER image segmentation algorithm;
    所述字符位置确定模块,具体用于:The character position determining module is specifically configured to:
    通过所述MSER图像分割算法,对采集的车牌图像中的字符进行检测,得到每个字符的MSER框位置;The MSER image segmentation algorithm is used to detect characters in the collected license plate image to obtain the MSER frame position of each character;
    将每个字符的MSER框位置确定为对应字符的位置。The position of the MSER box of each character is determined as the position of the corresponding character.
  9. 根据权利要求7或8所述的车牌识别装置,其特征在于,所述车牌倾斜角度确定模块,具体用于:The license plate recognition device according to claim 7 or 8, wherein the license plate tilt angle determining module is specifically configured to:
    根据所述车牌图像中每个字符的位置,确定所述车牌图像中每个字符的中心点坐标;Determining a center point coordinate of each character in the license plate image according to a position of each character in the license plate image;
    根据每个字符的中心点坐标,通过最小二乘法,确定所述车牌图像相较于水平方向的斜率;Determining a slope of the license plate image compared to a horizontal direction by a least squares method according to a center point coordinate of each character;
    根据所述斜率,确定所述车牌图像相较于水平方向的偏移角度;Determining, according to the slope, an offset angle of the license plate image compared to a horizontal direction;
    根据所述偏移角度及预设搜索角度范围,确定所述车牌图像的倾斜角度范围。Determining a range of tilt angles of the license plate image according to the offset angle and a preset search angle range.
  10. 根据权利要求7或8所述的车牌识别装置,其特征在于,所述车牌旋转校正模块,具体用于:The license plate recognition device according to claim 7 or 8, wherein the license plate rotation correction module is specifically configured to:
    按照所述倾斜角度范围,对所述车牌图像进行Radon变换,得到所述车牌图像的水平倾斜角度;Performing a Radon transform on the license plate image according to the tilt angle range to obtain a horizontal tilt angle of the license plate image;
    根据所述水平倾斜角度,将所述车牌图像进行旋转校正,得到水平倾斜校正后的车牌图像;Performing rotation correction on the license plate image according to the horizontal tilt angle to obtain a license plate image after horizontal tilt correction;
    按照所述倾斜角度范围,对所述水平倾斜校正后的车牌图像进行Radon变换,得到所述水平倾斜校正后的车牌图像的垂直倾斜角度;Performing a Radon transform on the license plate image after the horizontal tilt correction according to the tilt angle range, to obtain a vertical tilt angle of the license plate image after the horizontal tilt correction;
    根据所述垂直倾斜角度,对所述水平倾斜校正后的车牌图像进行校正,得到校正车牌图像。Correcting the horizontal tilt corrected license plate image according to the vertical tilt angle to obtain a corrected license plate image.
  11. 根据权利要求8所述的车牌识别装置,其特征在于,所述车牌畸变校正模块,具体用于:The license plate recognition device according to claim 8, wherein the license plate distortion correction module is specifically configured to:
    根据所述校正车牌图像的首字符的MSER框位置及末尾字符的MSER框位置,获取得到所述校正车牌图像的顶点坐标;Obtaining vertex coordinates of the corrected license plate image according to the position of the MSER frame of the first character of the corrected license plate image and the position of the MSER frame of the last character;
    对所述顶点坐标进行变换,得到字符等高的顶点变换坐标;Transforming the vertex coordinates to obtain vertex transformation coordinates of a character contour;
    对所述顶点变换坐标进行计算,得到变换参数;Calculating the vertex transformation coordinates to obtain transformation parameters;
    根据所述透视变换通用公式及所述变换参数,得到所述顶点坐标与所述顶点变换坐标的映射关系;Obtaining a mapping relationship between the vertex coordinates and the vertex transformation coordinates according to the perspective transformation general formula and the transformation parameters;
    根据所述映射关系及所述校正车牌图像,得到变换车牌图像。A converted license plate image is obtained based on the mapping relationship and the corrected license plate image.
  12. 根据权利要求8所述的车牌识别装置,其特征在于,所述车牌字符识别模块,具体用于:The license plate recognition device according to claim 8, wherein the license plate character recognition module is specifically configured to:
    利用多个预设车牌模板对所述变换车牌图像进行字符位置匹配,确定所述变换车牌图像中与预设车牌模板相匹配的字符的位置;Performing character position matching on the converted license plate image by using a plurality of preset license plate templates, and determining a position of a character in the converted license plate image that matches a preset license plate template;
    分别将每个位置上的字符输入预设神经网络进行模板匹配,得到每个字符的模板匹配置信度;The characters in each position are respectively input into a preset neural network for template matching, and the template matching confidence of each character is obtained;
    获取所述变换车牌图像中每个字符的MSER框位置对应的MSER结果置信度;Obtaining a confidence level of the MSER result corresponding to the position of the MSER frame of each character in the converted license plate image;
    依次比较每个字符的模板匹配置信度与该字符对应MSER框位置的MSER结果置信度,并在所述MSER结果置信度大于所述模板匹配置信度时,更新该位置的字符为所述MSER结果对应MSER框位置的字符;The template matching confidence of each character is compared with the MSER result confidence of the MSER frame position corresponding to the character, and when the MSER result confidence is greater than the template matching confidence, the character of the location is updated to be the MSER result. The character corresponding to the position of the MSER box;
    确定更新后的变换车牌图像为识别后的车牌。The updated converted license plate image is determined to be the recognized license plate.
  13. 一种车牌识别系统,其特征在于,所述系统包括:A license plate recognition system, characterized in that the system comprises:
    图像采集设备,用于对车辆进行拍摄,得到车牌图像;An image capture device for photographing a vehicle to obtain a license plate image;
    存储器,用于存放计算机程序;a memory for storing a computer program;
    处理器,用于执行所述存储器上所存放的程序时,实现权利要求1-6任一所述的方法步骤。The processor, when executed to execute the program stored on the memory, implements the method steps of any of claims 1-6.
  14. 一种存储介质,其特征在于,用于存储可执行代码,所述可执行代码用于在运行时执行:权利要求1-6任一所述的方法步骤。A storage medium for storing executable code for performing at runtime: the method steps of any of claims 1-6.
  15. 一种应用程序,其特征在于,用于在运行时执行:权利要求1-6任一所述的方法步骤。An application, characterized in that it is executed at runtime: the method steps of any of claims 1-6.
PCT/CN2018/083385 2017-06-02 2018-04-17 Method, device, and system for license plate recognition WO2018219054A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710408082.7 2017-06-02
CN201710408082.7A CN108985137B (en) 2017-06-02 2017-06-02 License plate recognition method, device and system

Publications (1)

Publication Number Publication Date
WO2018219054A1 true WO2018219054A1 (en) 2018-12-06

Family

ID=64454443

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/083385 WO2018219054A1 (en) 2017-06-02 2018-04-17 Method, device, and system for license plate recognition

Country Status (2)

Country Link
CN (1) CN108985137B (en)
WO (1) WO2018219054A1 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110458161A (en) * 2019-07-15 2019-11-15 天津大学 A kind of mobile robot doorplate location method of combination deep learning
CN110889323A (en) * 2019-10-10 2020-03-17 平安科技(深圳)有限公司 Universal license plate recognition method and device, computer equipment and storage medium
CN110969160A (en) * 2019-11-21 2020-04-07 合肥工业大学 License plate image correction and recognition method and system based on deep learning
CN111353517A (en) * 2018-12-24 2020-06-30 杭州海康威视数字技术股份有限公司 License plate recognition method and device and electronic equipment
CN111695563A (en) * 2020-06-10 2020-09-22 北京筑梦园科技有限公司 Single-layer and double-layer license plate recognition method, server and parking charging system
CN111783773A (en) * 2020-06-15 2020-10-16 北京工业大学 Correction method for angle-oriented inclined wire pole signboard
CN112052855A (en) * 2020-09-14 2020-12-08 北京易华录信息技术股份有限公司 License plate recognition method and device based on deep learning
CN113326836A (en) * 2020-02-28 2021-08-31 深圳市丰驰顺行信息技术有限公司 License plate recognition method and device, server and storage medium
CN113642577A (en) * 2021-10-14 2021-11-12 深圳市爱深盈通信息技术有限公司 Low-contrast license plate recognition method, system, equipment and storage medium
CN114067303A (en) * 2021-11-01 2022-02-18 北京智芯原动科技有限公司 License plate recognition method and device
CN115497084A (en) * 2022-11-14 2022-12-20 深圳天海宸光科技有限公司 Method for generating simulation license plate picture and character level label
CN117079284A (en) * 2023-07-26 2023-11-17 苏州城市学院 Character and image oriented inclination detection and correction method and system
US11842535B2 (en) 2018-12-29 2023-12-12 Zhejiang Dahua Technology Co., Ltd. Systems and methods for license plate recognition
CN111783773B (en) * 2020-06-15 2024-05-31 北京工业大学 Correction method for angle-inclined telegraph pole signboard

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111325670A (en) * 2018-12-13 2020-06-23 杭州海康威视数字技术股份有限公司 Data enhancement method and device and electronic equipment
CN111611994B (en) * 2019-02-26 2024-04-05 北京嘀嘀无限科技发展有限公司 Image extraction method, device, electronic equipment and storage medium
CN110659638B (en) * 2019-09-24 2023-04-07 北京精英路通科技有限公司 License plate recognition method and device, computer equipment and storage medium
CN111191653A (en) * 2019-12-25 2020-05-22 北京精英路通科技有限公司 License plate recognition method and device, computer equipment and storage medium
CN111325203B (en) * 2020-01-21 2022-07-05 福州大学 American license plate recognition method and system based on image correction
CN111382722B (en) * 2020-03-23 2023-09-05 浙江大华技术股份有限公司 License plate image optimization method, image processing device and device with storage function
US11651604B2 (en) * 2020-03-31 2023-05-16 Boe Technology Group Co., Ltd. Word recognition method, apparatus and storage medium
CN112580629A (en) * 2020-12-23 2021-03-30 深圳市捷顺科技实业股份有限公司 License plate character recognition method based on deep learning and related device
CN112634141B (en) * 2020-12-23 2024-03-29 浙江大华技术股份有限公司 License plate correction method, device, equipment and medium
CN113077018A (en) * 2021-06-07 2021-07-06 浙江大华技术股份有限公司 Target object identification method and device, storage medium and electronic device
CN113642570A (en) * 2021-07-02 2021-11-12 山东黄金矿业(莱州)有限公司三山岛金矿 Method for recognizing license plate of mine car in dark environment
TWI818535B (en) 2022-05-04 2023-10-11 博遠智能科技股份有限公司 System and method for license plate recognition
CN114677502B (en) * 2022-05-30 2022-08-12 松立控股集团股份有限公司 License plate detection method with any inclination angle

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101859382A (en) * 2010-06-03 2010-10-13 复旦大学 License plate detection and identification method based on maximum stable extremal region
CN104318233A (en) * 2014-10-19 2015-01-28 温州大学 Method for horizontal tilt correction of number plate image
CN105022991A (en) * 2015-06-29 2015-11-04 叶秀兰 Vehicle license plate processing and automatic recognition method
CN105205489A (en) * 2015-08-27 2015-12-30 华南理工大学 License plate detection method based on color texture analyzer and machine learning

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101303803A (en) * 2008-06-11 2008-11-12 北京中星微电子有限公司 Method and system for discriminating license plate
CN101398894B (en) * 2008-06-17 2011-12-07 浙江师范大学 Automobile license plate automatic recognition method and implementing device thereof
CN101751785B (en) * 2010-01-12 2012-01-25 杭州电子科技大学 Automatic license plate recognition method based on image processing
CN103116751B (en) * 2013-01-24 2016-07-06 河海大学 A kind of Method of Automatic Recognition for Character of Lcecse Plate
US20160110999A1 (en) * 2014-10-15 2016-04-21 Xerox Corporation Methods and systems for parking monitoring with vehicle identification
CN104408451A (en) * 2014-10-30 2015-03-11 安徽清新互联信息科技有限公司 Least-square-method-based license plate correction method
CN105279512B (en) * 2015-10-22 2018-07-10 东方网力科技股份有限公司 A kind of inclination licence plate recognition method and device
CN106203433A (en) * 2016-07-13 2016-12-07 西安电子科技大学 In a kind of vehicle monitoring image, car plate position automatically extracts and the method for perspective correction
CN106446893A (en) * 2016-09-14 2017-02-22 苏州佳世达电通有限公司 Tilt correction method and tilt correction system for license plate recognition

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101859382A (en) * 2010-06-03 2010-10-13 复旦大学 License plate detection and identification method based on maximum stable extremal region
CN104318233A (en) * 2014-10-19 2015-01-28 温州大学 Method for horizontal tilt correction of number plate image
CN105022991A (en) * 2015-06-29 2015-11-04 叶秀兰 Vehicle license plate processing and automatic recognition method
CN105205489A (en) * 2015-08-27 2015-12-30 华南理工大学 License plate detection method based on color texture analyzer and machine learning

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111353517A (en) * 2018-12-24 2020-06-30 杭州海康威视数字技术股份有限公司 License plate recognition method and device and electronic equipment
CN111353517B (en) * 2018-12-24 2023-09-26 杭州海康威视数字技术股份有限公司 License plate recognition method and device and electronic equipment
US11842535B2 (en) 2018-12-29 2023-12-12 Zhejiang Dahua Technology Co., Ltd. Systems and methods for license plate recognition
CN110458161A (en) * 2019-07-15 2019-11-15 天津大学 A kind of mobile robot doorplate location method of combination deep learning
CN110458161B (en) * 2019-07-15 2023-04-18 天津大学 Mobile robot doorplate positioning method combined with deep learning
CN110889323A (en) * 2019-10-10 2020-03-17 平安科技(深圳)有限公司 Universal license plate recognition method and device, computer equipment and storage medium
CN110969160B (en) * 2019-11-21 2023-04-14 合肥工业大学 License plate image correction and recognition method and system based on deep learning
CN110969160A (en) * 2019-11-21 2020-04-07 合肥工业大学 License plate image correction and recognition method and system based on deep learning
CN113326836A (en) * 2020-02-28 2021-08-31 深圳市丰驰顺行信息技术有限公司 License plate recognition method and device, server and storage medium
CN111695563A (en) * 2020-06-10 2020-09-22 北京筑梦园科技有限公司 Single-layer and double-layer license plate recognition method, server and parking charging system
CN111695563B (en) * 2020-06-10 2022-07-05 北京筑梦园科技有限公司 Single-layer and double-layer license plate recognition method, server and parking charging system
CN111783773A (en) * 2020-06-15 2020-10-16 北京工业大学 Correction method for angle-oriented inclined wire pole signboard
CN111783773B (en) * 2020-06-15 2024-05-31 北京工业大学 Correction method for angle-inclined telegraph pole signboard
CN112052855A (en) * 2020-09-14 2020-12-08 北京易华录信息技术股份有限公司 License plate recognition method and device based on deep learning
CN113642577A (en) * 2021-10-14 2021-11-12 深圳市爱深盈通信息技术有限公司 Low-contrast license plate recognition method, system, equipment and storage medium
CN114067303A (en) * 2021-11-01 2022-02-18 北京智芯原动科技有限公司 License plate recognition method and device
CN114067303B (en) * 2021-11-01 2024-05-07 北京智芯原动科技有限公司 License plate recognition method and device
CN115497084A (en) * 2022-11-14 2022-12-20 深圳天海宸光科技有限公司 Method for generating simulation license plate picture and character level label
CN117079284A (en) * 2023-07-26 2023-11-17 苏州城市学院 Character and image oriented inclination detection and correction method and system
CN117079284B (en) * 2023-07-26 2024-03-05 苏州城市学院 Character and image oriented inclination detection and correction method and system

Also Published As

Publication number Publication date
CN108985137B (en) 2021-08-27
CN108985137A (en) 2018-12-11

Similar Documents

Publication Publication Date Title
WO2018219054A1 (en) Method, device, and system for license plate recognition
CN106981077B (en) Infrared image and visible light image registration method based on DCE and LSS
CN106709500B (en) Image feature matching method
CN109784250B (en) Positioning method and device of automatic guide trolley
CN109492642B (en) License plate recognition method, license plate recognition device, computer equipment and storage medium
WO2021179485A1 (en) Image rectification processing method and apparatus, storage medium, and computer device
CN111723801B (en) Method and system for detecting and correcting target in fisheye camera picture
KR20110064117A (en) Method for determining frontal pose of face
CN111738320B (en) Shielded workpiece identification method based on template matching
Chen et al. Robust affine-invariant line matching for high resolution remote sensing images
CN109447117B (en) Double-layer license plate recognition method and device, computer equipment and storage medium
CN108875504B (en) Image detection method and image detection device based on neural network
CN112784712B (en) Missing child early warning implementation method and device based on real-time monitoring
US9129413B2 (en) Method and device for aligning a plurality of digital pictures
CN114331879A (en) Visible light and infrared image registration method for equalized second-order gradient histogram descriptor
CN113903024A (en) Handwritten bill numerical value information identification method, system, medium and device
WO2020087322A1 (en) Lane line recognition method and device, and vehicle
CN107680035B (en) Parameter calibration method and device, server and readable storage medium
CN111950554A (en) Identification card identification method, device, equipment and storage medium
CN113689365B (en) Target tracking and positioning method based on Azure Kinect
JPWO2019167238A1 (en) Image processing apparatus and image processing method
CN113744307A (en) Image feature point tracking method and system based on threshold dynamic adjustment
US10210414B2 (en) Object detection system and computer program product
Pan et al. An efficient method for skew correction of license plate
US11238309B2 (en) Selecting keypoints in images using descriptor scores

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18808743

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18808743

Country of ref document: EP

Kind code of ref document: A1