[go: up one dir, main page]

CN105117724B - A kind of license plate locating method and device - Google Patents

A kind of license plate locating method and device Download PDF

Info

Publication number
CN105117724B
CN105117724B CN201510458607.9A CN201510458607A CN105117724B CN 105117724 B CN105117724 B CN 105117724B CN 201510458607 A CN201510458607 A CN 201510458607A CN 105117724 B CN105117724 B CN 105117724B
Authority
CN
China
Prior art keywords
license plate
type
image
candidate
classifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510458607.9A
Other languages
Chinese (zh)
Other versions
CN105117724A (en
Inventor
马华东
傅慧源
周沫
车广富
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN201510458607.9A priority Critical patent/CN105117724B/en
Publication of CN105117724A publication Critical patent/CN105117724A/en
Application granted granted Critical
Publication of CN105117724B publication Critical patent/CN105117724B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/245Aligning, centring, orientation detection or correction of the image by locating a pattern; Special marks for positioning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/285Selection of pattern recognition techniques, e.g. of classifiers in a multi-classifier system
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/625License plates

Landscapes

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

Abstract

本发明实施例提供一种车牌定位方法及装置,方法包括:将视频帧图像的Haar特征输入第一分类器,得到第一类车牌图像信息序列,计算并筛选出第一类车牌相似值的最大值,判断其是否大于预设的第一相似度阈值,若是,定位到至少一个有效车牌图像,否则对视频帧图像进行旋转,将旋转后的图像输入第一分类器,得到多个第二类车牌图像信息序列,计算并筛选出数值最大的第二类车牌相似值,判断其是否大于预设的第二相似度阈值,若是,定位到至少一个有效车牌图像,否则,将视频帧图像的LBP特征输入第二分类器,得到第三类车牌图像信息序列,基于第三类车牌相似值的最大值,定位到至少一个有效车牌图像。应用本发明实施例,能够提高定位车牌的准确率。

Embodiments of the present invention provide a license plate location method and device. The method includes: inputting the Haar feature of the video frame image into the first classifier to obtain the first type of license plate image information sequence, and calculating and screening out the maximum similarity value of the first type of license plate. Value, judge whether it is greater than the preset first similarity threshold, if so, locate at least one valid license plate image, otherwise rotate the video frame image, input the rotated image into the first classifier, and obtain multiple second types License plate image information sequence, calculate and filter out the second type of license plate similarity value with the largest value, and judge whether it is greater than the preset second similarity threshold, if so, locate at least one valid license plate image, otherwise, the LBP of the video frame image The features are input into the second classifier to obtain the third type of license plate image information sequence, and at least one valid license plate image is located based on the maximum value of the similarity value of the third type of license plate. By applying the embodiment of the present invention, the accuracy of locating the license plate can be improved.

Description

一种车牌定位方法及装置A license plate location method and device

技术领域technical field

本发明涉及计算机视觉技术领域,特别是涉及一种车牌定位方法及装置。The invention relates to the technical field of computer vision, in particular to a method and device for locating a license plate.

背景技术Background technique

随着数字图像处理、模式识别和人工智能技术的日趋成熟,智能交通系统(ITS)已经逐渐成为21世纪道路交通发展的趋势。车牌识别技术是实现智能交通系统的基础,而车牌定位是车牌识别中十分重要的环节。在社区、校园、十字路口或多车道路口等非交通卡口的复杂场景中,监控摄像头所拍摄的视频帧图像中的车牌区域通常在位置、角度、大小清晰度方面具有明显的差异,另外,非交通卡口下拍摄的视频帧图像中的背景区域杂乱。With the maturity of digital image processing, pattern recognition and artificial intelligence technology, Intelligent Transportation System (ITS) has gradually become the trend of road traffic development in the 21st century. The license plate recognition technology is the basis of realizing the intelligent transportation system, and the license plate location is a very important link in the license plate recognition. In complex scenes of non-traffic checkpoints such as communities, campuses, crossroads or multi-lane intersections, the license plate areas in the video frame images captured by surveillance cameras usually have obvious differences in position, angle, size and definition. In addition, The background area in the video frame images captured at non-traffic checkpoints is cluttered.

在目前已有的非交通卡口的车牌定位技术中,通常提取非交通卡口下所拍摄的视频帧图像中的某种特征,例如,将灰度值或颜色等单一特征作为定位车牌的特征。In the existing license plate location technology for non-traffic checkpoints, some features in the video frame images taken under non-traffic checkpoints are usually extracted, for example, a single feature such as gray value or color is used as the feature for locating the license plate .

显然,非交通卡口下所拍摄的视频帧图像中的车牌区域的这些不利因素给后期的准确定位车牌增大了难度,因此,当上述现有技术中采用某种单一特征来定位车牌时,常常出现定位失败或者漏检的情况。Obviously, these unfavorable factors of the license plate area in the video frame images captured under non-traffic checkpoints have increased the difficulty of accurately locating the license plate in the later stage. Therefore, when a certain single feature is used to locate the license plate in the above-mentioned prior art, There are often positioning failures or missed detections.

发明内容Contents of the invention

本发明实施例的目的在于提供一种车牌定位方法及装置,以实现准确定位车牌,降低定位失败或者漏检的情况。The purpose of the embodiment of the present invention is to provide a license plate location method and device, so as to realize accurate positioning of the license plate and reduce the situation of location failure or missing detection.

为达到上述目的,本发明实施例公开了一种车牌定位方法,所述方法包括:In order to achieve the above object, the embodiment of the present invention discloses a license plate location method, the method comprising:

提取待定位车牌的视频帧图像的哈尔Haar特征,并将所述Haar特征输入至预先建立的第一分类器中,得到与所述视频帧图像对应的第一类车牌图像信息序列,其中,所述第一类车牌图像信息序列中包含视频帧图像中搜索到的第一类候选车牌图像的位置信息,所述第一分类器为:基于提取到的针对预定的第一样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器;Extract the Haar Haar feature of the video frame image of the license plate to be located, and input the Haar feature into the pre-established first classifier to obtain the first type of license plate image information sequence corresponding to the video frame image, wherein, The first type of license plate image information sequence includes the position information of the first type of candidate license plate image searched in the video frame image, and the first classifier is: based on the extracted first sample image set for a predetermined The Haar features of each image, and the classifier trained by the adaptive promotion algorithm Adaboost algorithm;

基于所述第一类候选车牌图像的位置信息,确定所述视频帧图像中的第一类候选车牌图像;Based on the position information of the first type of candidate license plate images, determine the first type of candidate license plate images in the video frame images;

计算所述第一类候选车牌图像的第一类车牌相似值,并筛选出第一类车牌相似值中的最大值;Calculate the first type of license plate similarity value of the first type of candidate license plate image, and filter out the maximum value in the first type of license plate similarity value;

判断筛选得到的第一类车牌相似值中的最大值是否大于预设的第一相似度阈值:Judging whether the maximum value of the similarity values of the first type of license plate obtained by screening is greater than the preset first similarity threshold:

在判断结果为大于时,根据预设的第一有效车牌定位规则和所计算得到的第一类车牌相似值,从所述第一类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,根据预设的图像旋转规则,对所述视频帧图像进行N次旋转,将每一次旋转后所得的视频帧图像再次输入至所述第一分类器中,获得N个第二类车牌图像信息序列,基于所述第二类车牌图像信息序列中的第二类候选车牌图像的位置信息,确定所述视频帧图像中的第二类候选车牌图像,计算每一第二类车牌图像信息序列所对应的第二类候选车牌图像的第二类车牌相似值,并筛选出每一第二类车牌图像信息序列所对应的第二类候选车牌图像的第二类车牌相似值中的最大值,进而,从筛选得到的各个第二类车牌相似值中的最大值中,确定出数值最大的目标第二类车牌相似值,判断所述目标第二类车牌相似值是否大于预设的第二相似度阈值,如果大于,根据预设的第二有效车牌定位规则和所计算得到的第二类车牌相似值,从所述目标第二类车牌相似值所对应的第二类车牌图像信息序列所针对的第二类候选车牌图像中定位到至少一个有效车牌图像,如果不大于,则When the judgment result is greater than, at least one effective license plate image is located from the first type of candidate license plate images according to the preset first valid license plate location rule and the calculated similarity value of the first type of license plate. When is not greater than, according to the preset image rotation rules, the video frame image is rotated N times, and the video frame image obtained after each rotation is re-inputted into the first classifier to obtain N second classifiers. A similar license plate image information sequence, based on the position information of the second type of candidate license plate image in the second type of license plate image information sequence, determine the second type of candidate license plate image in the video frame image, and calculate each second type of license plate image The second type of license plate similarity value of the second type of candidate license plate image corresponding to the image information sequence, and filter out the second type of license plate similarity value of the second type of candidate license plate image corresponding to each second type of license plate image information sequence The maximum value, and then, from the maximum value among the second-type license plate similarity values obtained by screening, determine the target second-type license plate similarity value with the largest value, and judge whether the target second-type license plate similarity value is greater than the preset If the second similarity threshold is greater than the second type of license plate image information corresponding to the target second type of license plate similarity value, according to the preset second valid license plate location rule and the calculated second type of license plate similarity value At least one valid license plate image is located in the second type of candidate license plate images targeted by the sequence, if not greater than

继续提取所述视频帧图像的局部二值模式LBP特征,并将所述LBP特征输入至预先建立的第二分类器中,得到与所述视频帧图像对应的第三类车牌图像信息序列,其中,所述第三类车牌图像信息序列中包含视频帧图像中搜索到的第三类候选车牌图像的位置信息,所述第二分类器为:基于提取到的针对预定的第二样本图像集合中各个图像的局部二值模式LBP特征,并采用自适应提升算法Adaboost算法训练得到的分类器;Continue to extract the local binary pattern LBP feature of the video frame image, and input the LBP feature into the pre-established second classifier to obtain the third type of license plate image information sequence corresponding to the video frame image, wherein , the third type of license plate image information sequence includes the position information of the third type of candidate license plate image searched in the video frame image, and the second classifier is: based on the extracted second sample image set for a predetermined The local binary mode LBP feature of each image, and the classifier obtained by using the adaptive promotion algorithm Adaboost algorithm training;

基于所述第三类候选车牌图像的位置信息,确定所述视频帧图像中的第三类候选车牌图像;Determining a third type of candidate license plate image in the video frame image based on the position information of the third type of candidate license plate image;

计算所述第三类候选车牌图像的第三类车牌相似值,并筛选出第三类车牌相似值中的最大值;Calculate the third type of license plate similarity value of the third type of candidate license plate image, and filter out the maximum value in the third type of license plate similarity value;

判断筛选得到的第三类车牌相似值的最大值是否大于预设的第三相似度阈值;在判断结果为大于时,根据预设的第三有效车牌定位规则和所计算得到的第三类车牌相似值,从所述第三类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定通过所述第一分类器和第二分类器未定位到有效车牌图像。Judging whether the maximum value of the similarity value of the third type of license plate obtained by screening is greater than the preset third similarity threshold; when the judgment result is greater than, according to the preset third valid license plate positioning rule and the calculated third type of license plate Similarity value, at least one valid license plate image is located from the third type of candidate license plate images, and when the judgment result is not greater than, it is determined that no valid license plate image has been located by the first classifier and the second classifier.

较佳的,计算任一第一类候选车牌图像的第一类车牌相似值的过程,包括:Preferably, the process of calculating the similarity value of the first type of license plate of any first type of candidate license plate images includes:

对第一类候选车牌图像进行二值化处理;Perform binarization processing on the first type of candidate license plate images;

对二值化处理后得到的第一类候选车牌图像进行开运算形态学变换;performing open operation morphological transformation on the first type of candidate license plate images obtained after binarization;

通过Sobel算法对经开运算形态学变换后的第一类候选车牌图像进行垂直滤波处理,得到开运算形态学变换后的第一类候选车牌图像的第一类垂直梯度图像;Through the Sobel algorithm, the first type of candidate license plate image after the opening operation morphological transformation is subjected to vertical filtering processing, and the first type vertical gradient image of the first type of candidate license plate image after the opening operation morphological transformation is obtained;

通过Canny算法对所述第一类垂直梯度图像进行边缘检测,获得第一类边缘图像;Perform edge detection on the first type of vertical gradient image by Canny algorithm to obtain the first type of edge image;

针对所述第一类边缘图像中提取到的边缘按照垂直方向进行六等分,计算每一等分中边缘部分像素点在水平方向的跳变均值;For the edge extracted in the first type of edge image, perform sextiles according to the vertical direction, and calculate the jump mean value of the edge part pixels in the horizontal direction in each equalization;

计算所述跳变均值的平均值,将计算得到的所述平均值确定为所述第一类候选车牌图像的第一类车牌相似值。An average value of the transition average values is calculated, and the calculated average value is determined as the first type of license plate similarity value of the first type of candidate license plate images.

较佳的,所述根据预设的第一有效车牌定位规则和所计算得到的第一类车牌相似值,从所述第一类候选车牌图像中定位到至少一个有效车牌图像,包括:Preferably, the positioning of at least one valid license plate image from the first type of candidate license plate images according to the preset first valid license plate location rule and the calculated similarity value of the first type of license plate includes:

将所述第一类车牌相似值中的最大值所对应的第一类候选车牌图像确定为定位到的有效车牌图像;Determining the first type of candidate license plate image corresponding to the maximum value in the first type of license plate similarity value as the located valid license plate image;

or

将所述第一类车牌相似值中,大于预设的第一定位阈值的第一类车牌相似值所对应的第一类候选车牌图像确定为定位到有效车牌图像。Among the first type of license plate similarity values, the first type of candidate license plate images corresponding to the first type of license plate similarity values greater than the preset first positioning threshold are determined as valid license plate images located.

较佳的,所述确定通过所述第一分类器和第二分类器未定位到有效车牌图像之后,所述方法还包括:Preferably, after it is determined that no valid license plate image is located by the first classifier and the second classifier, the method further includes:

将所述Haar特征输入至预先建立的第三分类器中,得到与所述视频帧图像对应的第四类车牌图像信息序列,其中,所述第四类车牌图像信息序列中包含视频帧图像中搜索到的第四类候选车牌图像的位置信息,所述第三分类器为:基于提取到的针对预定的第三样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器;Input the Haar feature into the pre-established third classifier to obtain a fourth type of license plate image information sequence corresponding to the video frame image, wherein the fourth type of license plate image information sequence includes the video frame image information sequence The position information of the searched fourth type of candidate license plate image, the third classifier is: based on the Haar feature extracted for each image in the predetermined third sample image set, and adopts the adaptive promotion algorithm Adaboost algorithm The trained classifier;

基于所述第四类候选车牌图像的位置信息,确定所述视频帧图像中的第四类候选车牌图像;Based on the position information of the fourth type of candidate license plate image, determine the fourth type of candidate license plate image in the video frame image;

计算所述第四类候选车牌图像的第四类车牌相似值,并筛选出第四类车牌相似值中的最大值;Calculate the fourth type of license plate similarity value of the fourth type of candidate license plate image, and filter out the maximum value in the fourth type of license plate similarity value;

判断筛选得到的第四类车牌相似值中的最大值是否大于预设的第四相似度阈值;在判断结果为大于时,根据预设的第四有效车牌定位规则和所计算得到的第四类车牌相似值,从所述第四类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定通过所述第一分类器、第二分类器和第三分类器未定位到有效车牌图像。Judging whether the maximum value of the similarity values of the fourth type of license plate obtained by screening is greater than the preset fourth similarity threshold; license plate similarity value, locate at least one valid license plate image from the fourth type of candidate license plate images, and when the judgment result is not greater than, determine that the first classifier, the second classifier and the third classifier are not located to a valid license plate image.

较佳的,所述确定通过所述第一分类器、第二分类器和第三分类器未定位到有效车牌图像之后,所述方法还包括:Preferably, after it is determined that a valid license plate image is not located by the first classifier, the second classifier and the third classifier, the method further includes:

将所述Haar特征输入至预先建立的第四分类器中,得到与所述视频帧图像对应的第五类车牌图像信息序列,其中,所述第五类车牌图像信息序列中包含视频帧图像中搜索到的第五类候选车牌图像的位置信息,所述第四分类器为:基于提取到的针对第四样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器;Input the Haar feature into the pre-established fourth classifier to obtain the fifth type of license plate image information sequence corresponding to the video frame image, wherein the fifth type of license plate image information sequence includes the video frame image information sequence The position information of the fifth type of candidate license plate images searched, the fourth classifier is: based on the extracted Haar features for each image in the fourth sample image set, and using the adaptive promotion algorithm Adaboost algorithm training to obtain classifier;

基于所述第五类候选车牌图像的位置信息,确定所述视频帧图像中的第五类候选车牌图像;Based on the position information of the fifth type of candidate license plate image, determine the fifth type of candidate license plate image in the video frame image;

计算所述第五类候选车牌图像的第五类车牌相似值,并筛选出第五类车牌相似值中的最大值;Calculate the fifth type of license plate similarity value of the fifth type of candidate license plate image, and filter out the maximum value in the fifth type of license plate similarity value;

判断筛选得到的第五类车牌相似值中的最大值是否大于预设的第五相似度阈值;在判断结果为大于时,根据预设的第五有效车牌定位规则和所计算得到的第五类车牌相似值,从所述第五类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定未定位到有效车牌图像。Judging whether the maximum value of the similarity value of the fifth type of license plate obtained by screening is greater than the preset fifth similarity threshold; License plate similarity value, at least one valid license plate image is located from the fifth type of candidate license plate images, and when the judgment result is not greater than, it is determined that no valid license plate image has been located.

为达到上述目的,本发明实施例公开了一种车牌定位装置,所述装置包括:In order to achieve the above purpose, the embodiment of the present invention discloses a license plate positioning device, which includes:

第一车牌序列获得模块,用于提取待定位车牌的视频帧图像的哈尔Haar特征,并将所述Haar特征输入至预先建立的第一分类器中,得到与所述视频帧图像对应的第一类车牌图像信息序列,其中,所述第一类车牌图像信息序列中包含视频帧图像中搜索到的第一类候选车牌图像的位置信息,所述第一分类器为:基于提取到的针对预定的第一样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器;The first license plate sequence acquisition module is used to extract the Haar Haar feature of the video frame image of the license plate to be located, and input the Haar feature into the pre-established first classifier to obtain the first corresponding to the video frame image. A type of license plate image information sequence, wherein the first type of license plate image information sequence includes the position information of the first type of candidate license plate image searched in the video frame image, and the first classifier is: based on the extracted Haar features of each image in the predetermined first sample image set, and a classifier obtained by using the adaptive promotion algorithm Adaboost algorithm training;

第一车牌图像确定模块,用于基于所述第一类候选车牌图像的位置信息,确定所述视频帧图像中的第一类候选车牌图像;The first license plate image determination module is configured to determine the first type of candidate license plate images in the video frame images based on the position information of the first type of candidate license plate images;

第一车牌相似度计算模块,用于计算所述第一类候选车牌图像的第一类车牌相似值,并筛选出第一类车牌相似值中的最大值;The first license plate similarity calculation module is used to calculate the first type of license plate similarity value of the first type of candidate license plate image, and filter out the maximum value in the first type of license plate similarity value;

第一车牌相似度判断模块,用于判断筛选得到的第一类车牌相似值中的最大值是否大于预设的第一相似度阈值;在判断结果为大于时,根据预设的第一有效车牌定位规则和所计算得到的第一类车牌相似值,从所述第一类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,触发第二车牌序列获得模块;The first license plate similarity judging module is used to judge whether the maximum value in the first type of license plate similarity obtained by screening is greater than the preset first similarity threshold; when the judgment result is greater than, according to the preset first valid license plate Positioning rules and the calculated similarity value of the first type of license plate, locating at least one valid license plate image from the first type of candidate license plate images, and triggering the second license plate sequence acquisition module when the judgment result is not greater than;

所述第二车牌序列获得模块,用于根据预设的图像旋转规则,对所述视频帧图像进行N次旋转,将每一次旋转后所得的视频帧图像再次输入至所述第一分类器中,获得N个第二类车牌图像信息序列;The second license plate sequence obtaining module is configured to perform N rotations on the video frame image according to a preset image rotation rule, and re-input the video frame image obtained after each rotation into the first classifier , to obtain N second-type license plate image information sequences;

第二车牌图像确定模块,用于基于所述第二类车牌图像信息序列中的第二类候选车牌图像的位置信息,确定所述视频帧图像中的第二类候选车牌图像;The second license plate image determining module is configured to determine the second type of candidate license plate image in the video frame image based on the position information of the second type of candidate license plate image in the second type of license plate image information sequence;

第二车牌相似度计算模块,用于计算每一第二类车牌图像信息序列所对应的第二类候选车牌图像的第二类车牌相似值,并筛选出每一第二类车牌图像信息序列所对应的第二类候选车牌图像的第二类车牌相似值中的最大值,进而,从筛选得到的各个第二类车牌相似值中的最大值中,确定出数值最大的目标第二类车牌相似值;The second license plate similarity calculation module is used to calculate the second type of license plate similarity value of the second type of candidate license plate image corresponding to each second type of license plate image information sequence, and filter out the second type of license plate image information sequence. The maximum value of the second type of license plate similarity value of the corresponding second type of candidate license plate image, and then, from the maximum value of each second type of license plate similarity value obtained by screening, determine the target second type of license plate similarity with the largest value value;

第二车牌相似度判断模块,用于判断所述目标第二类车牌相似值是否大于预设的第二相似度阈值,如果大于,根据预设的第二有效车牌定位规则和所计算得到的第二类车牌相似值,从所述目标第二类车牌相似值所对应的第二类车牌图像信息序列所针对的第二类候选车牌图像中定位到至少一个有效车牌图像,如果不大于,则触发第三车牌序列获得模块;The second license plate similarity judging module is used to judge whether the target second type of license plate similarity value is greater than the preset second similarity threshold, if greater, according to the preset second valid license plate location rule and the calculated first The second type of license plate similarity value, locate at least one valid license plate image from the second type of candidate license plate image targeted by the second type of license plate image information sequence corresponding to the target second type of license plate similarity value, if not greater than, trigger The module for obtaining the third license plate sequence;

所述第三车牌序列获得模块,用于继续提取所述视频帧图像的局部二值模式LBP特征,并将所述LBP特征输入至预先建立的第二分类器中,得到与所述视频帧图像对应的第三类车牌图像信息序列,其中,所述第三类车牌图像信息序列中包含视频帧图像中搜索到的第三类候选车牌图像的位置信息,所述第二分类器为:基于提取到的针对预定的第二样本图像集合中各个图像的局部二值模式LBP特征,并采用自适应提升算法Adaboost算法训练得到的分类器;The third license plate sequence obtaining module is used to continue to extract the local binary mode LBP feature of the video frame image, and input the LBP feature into the pre-established second classifier to obtain the image similar to the video frame image. The corresponding third type of license plate image information sequence, wherein the third type of license plate image information sequence includes the position information of the third type of candidate license plate image searched in the video frame image, and the second classifier is: based on extracting The obtained local binary pattern LBP feature for each image in the predetermined second sample image collection, and the classifier obtained by using the adaptive lifting algorithm Adaboost algorithm training;

第三车牌图像确定模块,用于基于所述第三类候选车牌图像的位置信息,确定所述视频帧图像中的第三类候选车牌图像;A third license plate image determining module, configured to determine a third type of candidate license plate image in the video frame image based on the position information of the third type of candidate license plate image;

第三车牌相似度计算模块,用于计算所述第三类候选车牌图像的第三类车牌相似值,并筛选出第三类车牌相似值中的最大值;The third license plate similarity calculation module is used to calculate the third type of license plate similarity value of the third type of candidate license plate images, and select the maximum value among the third type of license plate similarity values;

第三车牌相似度判断模块,用于判断筛选得到的第三类车牌相似值的最大值是否大于预设的第三相似度阈值;在判断结果为大于时,根据预设的第三有效车牌定位规则和所计算得到的第三类车牌相似值,从所述第三类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定通过所述第一分类器和第二分类器未定位到有效车牌图像。The third license plate similarity judging module is used to judge whether the maximum value of the similarity value of the third type of license plate obtained by screening is greater than the preset third similarity threshold; The rules and the calculated similarity value of the third type of license plate are used to locate at least one valid license plate image from the third type of candidate license plate images, and when the judgment result is not greater than The classifier did not locate a valid license plate image.

较佳的,所述第一车牌相似度计算模块,用于:Preferably, the first license plate similarity calculation module is used for:

对第一类候选车牌图像进行二值化处理;Perform binarization processing on the first type of candidate license plate images;

对二值化处理后得到的第一类候选车牌图像进行开运算形态学变换;performing open operation morphological transformation on the first type of candidate license plate images obtained after binarization;

通过Sobel算法对经开运算形态学变换后的第一类候选车牌图像进行垂直滤波处理,得到开运算形态学变换后的第一类候选车牌图像的第一类垂直梯度图像;Through the Sobel algorithm, the first type of candidate license plate image after the opening operation morphological transformation is subjected to vertical filtering processing, and the first type vertical gradient image of the first type of candidate license plate image after the opening operation morphological transformation is obtained;

通过Canny算法对所述第一类垂直梯度图像进行边缘检测,获得第一类边缘图像;Perform edge detection on the first type of vertical gradient image by Canny algorithm to obtain the first type of edge image;

针对所述第一类边缘图像中提取到的边缘按照垂直方向进行六等分,计算每一等分中边缘部分像素点在水平方向的跳变均值;For the edge extracted in the first type of edge image, perform sextiles according to the vertical direction, and calculate the jump mean value of the edge part pixels in the horizontal direction in each equalization;

计算所述跳变均值的平均值,将计算得到的所述平均值确定为所述第一类候选车牌图像的第一类车牌相似值。An average value of the transition average values is calculated, and the calculated average value is determined as the first type of license plate similarity value of the first type of candidate license plate images.

较佳的,所述第一车牌相似度判断模块包括用于根据预设的第一有效车牌定位规则和所计算得到的第一类车牌相似值从所述第一类候选车牌图像中定位到至少一个有效车牌图像的第一车牌定位子模块;Preferably, the first license plate similarity judging module includes a function for locating from the first type of candidate license plate images at least A first license plate location submodule of an effective license plate image;

所述第一车牌定位子模块,具体用于:The first license plate positioning submodule is specifically used for:

将所述第一类车牌相似值中的最大值所对应的第一类候选车牌图像确定为定位到的有效车牌图像;或将所述第一类车牌相似值中,大于预设的第一定位阈值的第一类车牌相似值所对应的第一类候选车牌图像确定为定位到有效车牌图像。Determining the first type of candidate license plate image corresponding to the maximum value of the first type of license plate similarity value as the located valid license plate image; The first type of candidate license plate image corresponding to the first type of license plate similarity value of the threshold is determined to be a valid license plate image.

较佳的,所述装置还包括:Preferably, the device also includes:

第四车牌序列获得模块,用于将所述Haar特征输入至预先建立的第三分类器中,得到与所述视频帧图像对应的第四类车牌图像信息序列,其中,所述第四类车牌图像信息序列中包含视频帧图像中搜索到的第四类候选车牌图像的位置信息,所述第三分类器为:基于提取到的针对预定的第三样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器;The fourth license plate sequence obtaining module is used to input the Haar feature into the pre-established third classifier to obtain the fourth type of license plate image information sequence corresponding to the video frame image, wherein the fourth type of license plate The image information sequence contains the position information of the fourth type of candidate license plate image searched in the video frame image, and the third classifier is: based on the extracted Haar feature for each image in the predetermined third sample image set , and use the adaptive boosting algorithm Adaboost algorithm to train the classifier;

第四车牌图像确定模块,用于基于所述第四类候选车牌图像的位置信息,确定所述视频帧图像中的第四类候选车牌图像;A fourth license plate image determination module, configured to determine a fourth type of candidate license plate image in the video frame image based on the position information of the fourth type of candidate license plate image;

第四车牌相似度计算模块,用于计算所述第四类候选车牌图像的第四类车牌相似值,并筛选出第四类车牌相似值中的最大值;The fourth license plate similarity calculation module is used to calculate the fourth type of license plate similarity value of the fourth type of candidate license plate image, and filter out the maximum value in the fourth type of license plate similarity value;

第四车牌相似度判断模块,用于判断筛选得到的第四类车牌相似值中的最大值是否大于预设的第四相似度阈值;在判断结果为大于时,根据预设的第四有效车牌定位规则和所计算得到的第四类车牌相似值,从所述第四类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定通过所述第一分类器、第二分类器和第三分类器未定位到有效车牌图像。The fourth license plate similarity judging module is used to judge whether the maximum value in the fourth type of license plate similarity obtained by screening is greater than the preset fourth similarity threshold; when the judgment result is greater than, according to the preset fourth valid license plate Positioning rules and the calculated similarity value of the fourth type of license plate, at least one valid license plate image is located from the fourth type of candidate license plate image, and when the judgment result is not greater than, it is determined that the first classifier, the second The second classifier and the third classifier did not locate valid license plate images.

较佳的,所述装置还包括:Preferably, the device also includes:

第五车牌序列获得模块,用于将所述Haar特征输入至预先建立的第四分类器中,得到与所述视频帧图像对应的第五类车牌图像信息序列,其中,所述第五类车牌图像信息序列中包含视频帧图像中搜索到的第五类候选车牌图像的位置信息,所述第四分类器为:基于提取到的针对第四样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器;The fifth license plate sequence obtaining module is used to input the Haar feature into the pre-established fourth classifier to obtain the fifth type of license plate image information sequence corresponding to the video frame image, wherein the fifth type of license plate The image information sequence includes the position information of the fifth type of candidate license plate image searched in the video frame image, and the fourth classifier is: based on the extracted Haar feature for each image in the fourth sample image set, and The classifier trained by the adaptive promotion algorithm Adaboost algorithm;

第五车牌图像确定模块,用于基于所述第五类候选车牌图像的位置信息,确定所述视频帧图像中的第五类候选车牌图像;A fifth license plate image determination module, configured to determine the fifth type of candidate license plate image in the video frame image based on the position information of the fifth type of candidate license plate image;

第五车牌相似度计算模块,用于计算所述第五类候选车牌图像的第五类车牌相似值,并筛选出第五类车牌相似值中的最大值;The fifth license plate similarity calculation module is used to calculate the fifth type of license plate similarity value of the fifth type of candidate license plate image, and select the maximum value among the fifth type of license plate similarity values;

第五车牌相似度判断模块,用于判断筛选得到的第五类车牌相似值中的最大值是否大于预设的第五相似度阈值;在判断结果为大于时,根据预设的第五有效车牌定位规则和所计算得到的第五类车牌相似值,从所述第五类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定未定位到有效车牌图像。The fifth license plate similarity judging module is used to judge whether the maximum value in the fifth type of license plate similarity value obtained by screening is greater than the preset fifth similarity threshold; when the judgment result is greater than, according to the preset fifth valid license plate Based on the location rule and the calculated similarity value of the fifth type of license plate, at least one valid license plate image is located from the fifth type of candidate license plate images, and when the judgment result is not greater than that, it is determined that no valid license plate image has been located.

本发明实施例提供的一种车牌定位方法及装置方法及装置,通过设计多级筛选机制的多个串联的分类器,提取摄像头所拍摄到的视频帧图像中的图像的多个特征构成的综合特征,大大提高了利用单一特征定位车牌时容易出现的车牌定位失败或者漏检的情况,同时,当视频帧图像输入提取的哈尔Haar特征输入至第一分类器后未定位到满足条件的候选车牌图像时,进一步对该视频帧图像进行了多次旋转,将旋转后的图像再次输入至第一分类器,这样能够提高因图像拍摄角度所带来的定位失败或漏检的情况,显然,通过层层的分类器对该视频帧图像中的候选车牌图像的搜索,提高了准确定位车牌的可能性,降低了定位失败或者漏检情况的机率。当然,实施本发明的任一产品或方法必不一定需要同时达到以上所述的所有优点。A method and device for locating a license plate provided by an embodiment of the present invention. The method and device design a multi-stage screening mechanism for a plurality of series-connected classifiers to extract a combination of multiple features of the image in the video frame image captured by the camera. feature, which greatly improves the failure or missed detection of the license plate that is prone to occur when using a single feature to locate the license plate. At the same time, when the Haar feature extracted from the video frame image input is input to the first classifier, no candidate that satisfies the condition is located. For the license plate image, the video frame image is further rotated multiple times, and the rotated image is input to the first classifier again, which can improve the positioning failure or missed detection caused by the image shooting angle. Obviously, Searching for candidate license plate images in the video frame image through layer-by-layer classifiers improves the possibility of accurately locating the license plate and reduces the probability of positioning failure or missed detection. Of course, implementing any product or method of the present invention does not necessarily need to achieve all the above-mentioned advantages at the same time.

图说明Illustration

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为本发明实施例提供的一种车牌定位方法的流程示意图;Fig. 1 is a schematic flow chart of a license plate location method provided by an embodiment of the present invention;

图2为本发明实施例提供的两幅定位到的有效车牌图像;Fig. 2 provides two effective license plate images located for the embodiment of the present invention;

图3为本发明实施例提供的另一种车牌定位方法的流程示意图;FIG. 3 is a schematic flow diagram of another license plate location method provided by an embodiment of the present invention;

图4为本发明实施例提供的另一种车牌定位方法的流程示意图;4 is a schematic flow chart of another license plate location method provided by an embodiment of the present invention;

图5(a)和图5(b)为本发明实施例提供的霍夫变换后的结果示意图;Figure 5(a) and Figure 5(b) are schematic diagrams of the results of the Hough transform provided by the embodiment of the present invention;

图6(a)-图6(d)为本发明实施例提供的去杂二值化处理后的结果示意图;Fig. 6(a)-Fig. 6(d) are schematic diagrams of the results after desulphurization and binarization processing provided by the embodiment of the present invention;

图7为本发明实施例提供的一种车牌定位装置的结构示意图。Fig. 7 is a schematic structural diagram of a license plate positioning device provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

图1为本发明实施例提供的一种车牌定位方法的流程示意图,该方法可以包括以下步骤:Fig. 1 is a schematic flow chart of a license plate location method provided by an embodiment of the present invention, the method may include the following steps:

步骤S101:提取待定位车牌的视频帧图像的哈尔Haar特征,并将所述Haar特征输入至预先建立的第一分类器中,得到与所述视频帧图像对应的第一类车牌图像信息序列。Step S101: extract the Haar Haar feature of the video frame image of the license plate to be located, and input the Haar feature into the pre-established first classifier to obtain the first type of license plate image information sequence corresponding to the video frame image .

其中,第一类车牌图像信息序列中包含视频帧图像中搜索到的第一类候选车牌图像的位置信息。Wherein, the first type of license plate image information sequence includes the position information of the first type of candidate license plate images searched in the video frame images.

本发明中的“候选车牌图像”为分类器从监控视频中获得的视频帧图像中搜索到的图像,需要说明的是,候选车牌图像中有可能是车牌的图像,也有可能不是车牌的图像。另外,若经过后续步骤定位到的候选车牌图像是车牌的图像时,说明分类器定位正确;若经过后续步骤未定位到候选车牌图像,且搜索出的该候选车牌图像中的确不是车牌的图像时,也说明分类器定位正确,否则,表明分类器定位失败。The "candidate license plate image" in the present invention is the image searched by the classifier from the video frame images obtained from the surveillance video. It should be noted that the candidate license plate images may or may not be license plate images. In addition, if the candidate license plate image located by the subsequent steps is the image of the license plate, it means that the classifier is positioned correctly; , which also indicates that the classifier is positioned correctly, otherwise, it indicates that the classifier has failed to locate.

需要说明的是,本发明中提及的“车牌图像信息序列”中包含视频帧图像中搜索到的候选车牌图像的位置信息,例如,车牌图像在视频帧图像中所处的由像素坐标所表示的图像区域。另外,车牌图像信息序列中包含了通过分类器搜索到的全部的候选车牌图像的位置信息。It should be noted that the "license plate image information sequence" mentioned in the present invention includes the position information of the candidate license plate image searched in the video frame image, for example, the location of the license plate image in the video frame image is represented by pixel coordinates image area. In addition, the sequence of license plate image information includes position information of all candidate license plate images searched by the classifier.

其中,第一分类器为:基于提取到的针对预定的第一样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器。Wherein, the first classifier is: based on the extracted Haar features for each image in the predetermined first sample image set, and using the adaptive boosting algorithm Adaboost algorithm to train the classifier.

在本发明的一种具体实现方式中,可以通过如下方式建立第一分类器:首先,选取用于训练分类器的正负样本,其中,车牌图像(正样本)1000幅,非车牌图像(负样本)10000幅;然后,提出正负样本中每幅图像的Haar特征;最后,将提取得到的Haar特征输入至OpenCV自带的Adaboost分类器训练程序中运行,根据所建立的分类器的虚警率(即:将非车牌图像定位成了车牌图像)、命中率等参数来优化所建立的分类器。In a specific implementation of the present invention, the first classifier can be established in the following manner: first, select positive and negative samples for training the classifier, wherein, there are 1000 license plate images (positive samples) and 1000 non-license plate images (negative samples). samples) 10,000 images; then, the Haar feature of each image in the positive and negative samples is proposed; finally, the extracted Haar feature is input into the Adaboost classifier training program that comes with OpenCV, and according to the false alarm of the established classifier Rate (that is: positioning the non-license plate image as the license plate image), hit rate and other parameters to optimize the established classifier.

需要说明的是,可以针对车牌图像的一种特征使用Adaboost分类器进行离线训练,获得可以定位车牌的分类器,利用Adaboost算法训练出的分类器在车牌定位中具有一定的可行性和可靠性。另外,在分类器的训练或建立过程中,最好使训练的样本图像尽可能的大,样本图像尽可能的多样化,这样,在实际应用中所建立的分类器的效率就越好。It should be noted that the Adaboost classifier can be used for offline training for a feature of the license plate image to obtain a classifier that can locate the license plate. The classifier trained by the Adaboost algorithm has certain feasibility and reliability in the license plate location. In addition, in the process of training or establishing the classifier, it is best to make the training sample images as large as possible and the sample images as diverse as possible, so that the efficiency of the classifier established in practical applications is better.

还需要说明的是,上面提及的基于Adaboost算法训练出的分类器仅仅是举例,本发明并不需要对建立分类器的具体算法进行限定,当然还可以有其他建立分类器的方式,例如,基于支持向量机SVM的分类器建立方法,任何可能的实现方式均可以应用于本发明,本领域内的技术人员需要根据实际情况来确定具体采用何种方式来建立分类器。It should also be noted that the above-mentioned classifiers trained based on the Adaboost algorithm are only examples, and the present invention does not need to limit the specific algorithm for establishing the classifier, and of course there are other ways of establishing the classifier, for example, Any possible implementation of the SVM-based classifier building method can be applied to the present invention, and those skilled in the art need to determine which method to use to build the classifier according to the actual situation.

步骤S102:基于所述第一类候选车牌图像的位置信息,确定所述视频帧图像中的第一类候选车牌图像。Step S102: Based on the position information of the first type of candidate license plate images, determine the first type of candidate license plate images in the video frame images.

步骤S103:计算所述第一类候选车牌图像的第一类车牌相似值,并筛选出第一类车牌相似值中的最大值。Step S103: Calculate the first type of license plate similarity values of the first type of candidate license plate images, and filter out the maximum value among the first type of license plate similarity values.

在本发明的一种具体实现方式中,计算任一第一类候选车牌图像的第一类车牌相似值的过程,可以包括以下步骤:In a specific implementation of the present invention, the process of calculating the similarity value of the first type of license plate of any first type of candidate license plate images may include the following steps:

A:对第一类候选车牌图像进行二值化处理;A: Perform binarization processing on the first type of candidate license plate images;

B:对二值化处理后得到的第一类候选车牌图像进行开运算形态学变换;B: Perform open operation morphological transformation on the first type of candidate license plate images obtained after binarization processing;

C:通过Sobel算法对经开运算形态学变换后的第一类候选车牌图像进行垂直滤波处理,得到开运算形态学变换后的第一类候选车牌图像的第一类垂直梯度图像;C: Carry out vertical filtering processing on the first type candidate license plate image after the opening operation morphological transformation by Sobel algorithm, and obtain the first type vertical gradient image of the first type candidate license plate image after the opening operation morphological transformation;

D:通过Canny算法对所述第一类垂直梯度图像进行边缘检测,获得第一类边缘图像;D: performing edge detection on the first type of vertical gradient image by the Canny algorithm to obtain the first type of edge image;

E:针对所述第一类边缘图像中提取到的边缘按照垂直方向进行六等分,计算每一等分中边缘部分像素点在水平方向的跳变均值;E: For the edge extracted in the first type of edge image, the edge is divided into six equal parts according to the vertical direction, and the average jump value of the pixel points in the edge part in the horizontal direction is calculated in each equal part;

其中,由于通过步骤D检测得到的边缘图像中,边缘部分为的像素点的像素值为255,非边缘部分的像素点的像素值为0。因此,当从步骤E六等分之后得到的任一高度,按照从首至尾的顺序遍历该行像素点时,就会出现黑白点的交替变换,当连续两个像素点的像素值不同时就记为一次跳变,统计该行跳变次数,就能够得到每一等分中边缘部分像素点在水平方向的跳变均值。Wherein, in the edge image obtained through the detection in step D, the pixel value of the pixel point in the edge part is 255, and the pixel value of the pixel point in the non-edge part is 0. Therefore, when traversing the row of pixels in order from the beginning to the end of any height obtained after the six equal parts of step E, there will be an alternate transformation of black and white points. When the pixel values of two consecutive pixels are different It is recorded as a jump, and the number of jumps in this line is counted to obtain the average value of the jumps in the horizontal direction of the edge part pixels in each aliquot.

F:计算所述跳变均值的平均值,将计算得到的所述平均值确定为所述第一类候选车牌图像的第一类车牌相似值。F: Calculate the average value of the transition average value, and determine the calculated average value as the first type of license plate similarity value of the first type of candidate license plate image.

需要说明的是,上述计算任一第一类候选车牌图像的第一类车牌相似值的过程仅仅是举例,本发明实施例不需要对车牌相似值的计算过程进行限定,任何可能的实现方式均可以应用于本发明。It should be noted that the above-mentioned process of calculating the first-type license plate similarity value of any first-type candidate license plate image is just an example, and the embodiment of the present invention does not need to limit the calculation process of the license plate similarity value, and any possible implementation methods are can be applied to the present invention.

步骤S104:判断筛选得到的第一类车牌相似值中的最大值是否大于预设的第一相似度阈值,在判读结果为大于时,执行步骤S105,否则执行步骤S106。Step S104: Determine whether the maximum value among the similarity values of the first type of license plate obtained through screening is greater than the preset first similarity threshold, and if the judgment result is greater, perform step S105; otherwise, perform step S106.

优选的,第一相似度阈值可以包括:对于单排车牌而言,该阈值设置为13;对于双排车牌而言,该阈值设置为12。需要说明的是,这里所设置的阈值仅仅是本发明的一种优选方式,本发明不需要对第一相似度阈值的具体数值进行限定,至于选取何种阈值,需要本领域内的技术人员根据实际情况来确定。Preferably, the first similarity threshold may include: for a single-row license plate, the threshold is set to 13; for a double-row license plate, the threshold is set to 12. It should be noted that the threshold set here is only a preferred mode of the present invention, and the present invention does not need to limit the specific value of the first similarity threshold. As for which threshold to choose, it needs to be determined by those skilled in the art. to determine the actual situation.

步骤S105:根据预设的第一有效车牌定位规则和所计算得到的第一类车牌相似值,从所述第一类候选车牌图像中定位到至少一个有效车牌图像,参见图2,图2为本发明实施例提供的两幅定位到的有效车牌图像。Step S105: According to the preset first effective license plate location rule and the calculated similarity value of the first type of license plate, locate at least one valid license plate image from the first type of candidate license plate images, see Figure 2, Figure 2 is The two located valid license plate images provided by the embodiment of the present invention.

在本发明的一种具体实现方式中,可以将第一类车牌相似值中的最大值所对应的第一类候选车牌图像确定为定位到的有效车牌图像。In a specific implementation of the present invention, the first type of candidate license plate image corresponding to the maximum value among the first type of license plate similarity values may be determined as the located effective license plate image.

在本发明的另一种具体实现方式中,可以将所述第一类车牌相似值中,大于第一定位阈值的第一类车牌相似值所对应的第一类候选车牌图像确定为定位到有效车牌图像。In another specific implementation of the present invention, among the first type of license plate similarity values, the first type of candidate license plate images corresponding to the first type of license plate similarity values greater than the first positioning threshold can be determined as valid positioning. license plate image.

具体的,预设的第一定位阈值可以设置为第一类车牌相似值中的最大值max的某一倍数,例如:max*70%。当然,本发明不需要对这个倍数进行具体限定,本领域内的技术人员需要根据实际应用情况来确定。Specifically, the preset first positioning threshold may be set as a multiple of the maximum value max among the similarity values of the first type of license plate, for example: max*70%. Of course, the present invention does not need to specifically limit this multiple, and those skilled in the art need to determine it according to actual application conditions.

举例而言,假设:第一类车牌相似值按照由大到小的顺序排分别是:a=99%、b=95%、c=93%、d=89%和e=85%,预设的第一定位阈值为90%。For example, suppose: the similarity values of the first type of license plates are arranged in descending order: a=99%, b=95%, c=93%, d=89% and e=85%, preset The first localization threshold is 90%.

显然,根据上述第一种实现方式中提到的方法,就是将a对应的第一类候选车牌图像确定为定位到的有效车牌图像;Obviously, according to the method mentioned in the first implementation above, the first type of candidate license plate image corresponding to a is determined as the effective license plate image located;

显然,根据上述第二种实现方式中提到的方法,就是将相似值大于90%的a、b和c对应的第一类候选车牌图像确定为定位到的有效车牌图像。Obviously, according to the method mentioned in the above-mentioned second implementation manner, the first type of candidate license plate images corresponding to a, b and c with a similarity value greater than 90% are determined as the located effective license plate images.

需要说明的是,上述所列举的两种具体实现方式仅仅是举例,当然本发明还有其他可能的具体实现方式,本发明不需要对定位有效车牌图像的具体实现方式进行限定,本领域内的技术人员需要根据实际应用中的具体情况来确定。It should be noted that the two specific implementations listed above are only examples. Of course, the present invention also has other possible specific implementations. The present invention does not need to limit the specific implementation of locating valid license plate images. Technicians need to determine according to the specific conditions in the actual application.

步骤S106:根据预设的图像旋转规则,对所述视频帧图像进行N次旋转,将每一次旋转后所得的视频帧图像再次输入至所述第一分类器中,获得N个第二类车牌图像信息序列。Step S106: According to the preset image rotation rules, the video frame image is rotated N times, and the video frame image obtained after each rotation is re-inputted into the first classifier to obtain N second-type license plates sequence of image information.

在本发明的一种具体实现方式中,预设的图像旋转规则可以是:将视频帧图像在[-20°,20°]的范围内按照顺时针方向进行旋转,且每次旋转2°,得到一幅新的视频帧图像。In a specific implementation of the present invention, the preset image rotation rule may be: rotate the video frame image clockwise within the range of [-20°, 20°], and each rotation is 2°, Get a new video frame image.

需要说明的是,由于非交通卡口场景下所拍摄的视频帧图像中的车牌图像的角度有很大的不同,所以在车牌图像的定位过程中会出现未定位到车牌图像或者将车牌图像误判成非车牌图像的情况,因此,本发明中的方案在上述情况下对视频帧图像进行旋转,寻找到最适合定位的角度,以使得预先建立的第一分类器对于倾斜角度过大的车牌图像尽可能的定位准确。还需要说明的是,本发明中并不需要对视频帧图像旋转的允许范围以及每次所旋转的角度的具体数值进行限定,本领域内的技术人员需要根据实际应用中的具体情况进行合理的设定。It should be noted that since the angles of the license plate images in the video frame images captured in non-traffic checkpoint scenes are very different, the license plate image may not be located or the license plate image may be misplaced during the positioning process of the license plate image. Judged as the situation of non-license plate image, therefore, the scheme in the present invention rotates the video frame image in the above-mentioned situation, finds the angle most suitable for positioning, so that the first classifier established in advance can be used for the license plate with too large inclination angle Images are positioned as accurately as possible. It should also be noted that in the present invention, there is no need to limit the allowable range of the video frame image rotation and the specific value of the angle rotated each time. Those skilled in the art need to make reasonable adjustments according to the specific conditions in the actual application. set up.

步骤S107:基于所述第二类车牌图像信息序列中的第二类候选车牌图像的位置信息,确定所述视频帧图像中的第二类候选车牌图像。Step S107: Based on the position information of the second type of candidate license plate images in the second type of license plate image information sequence, determine the second type of candidate license plate images in the video frame images.

步骤S108:计算每一第二类车牌图像信息序列所对应的第二类候选车牌图像的第二类车牌相似值,并筛选出每一第二类车牌图像信息序列所对应的第二类候选车牌图像的第二类车牌相似值中的最大值,进而,从筛选得到的各个第二类车牌相似值中的最大值中,确定出数值最大的目标第二类车牌相似值。Step S108: Calculate the second-type license plate similarity value of the second-type candidate license plate image corresponding to each second-type license plate image information sequence, and filter out the second-type candidate license plate corresponding to each second-type license plate image information sequence The maximum value among the second-type license plate similarity values of the image, and then, from the maximum values among the second-type license plate similarity values obtained through screening, determine the target second-type license plate similarity value with the largest value.

步骤S109:判断所述目标第二类车牌相似值是否大于预设的第二相似度阈值,如果大于,执行步骤S110,否则执行步骤S11。Step S109: Determine whether the similarity value of the target second-type license plate is greater than a preset second similarity threshold, if so, perform step S110, otherwise perform step S11.

步骤S110:根据预设的第二有效车牌定位规则和所计算得到的第二类车牌相似值,从所述目标第二类车牌相似值所对应的第二类车牌图像信息序列所针对的第二类候选车牌图像中定位到至少一个有效车牌图像。Step S110: According to the preset second effective license plate location rule and the calculated similarity value of the second type of license plate, from the second type of license plate image information sequence corresponding to the target second type of license plate similarity value At least one valid license plate image is located in the candidate license plate image.

需要说明的是,步骤S107-S110与步骤S102-S105的方法类似,此处不再赘述。It should be noted that steps S107-S110 are similar to steps S102-S105, and will not be repeated here.

步骤S111:继续提取所述视频帧图像的局部二值模式LBP特征,并将所述LBP特征输入至预先建立的第二分类器中,得到与所述视频帧图像对应的第三类车牌图像信息序列。Step S111: continue to extract the local binary pattern LBP feature of the video frame image, and input the LBP feature into the pre-established second classifier to obtain the third type of license plate image information corresponding to the video frame image sequence.

其中,第三类车牌图像信息序列中包含视频帧图像中搜索到的第三类候选车牌图像的位置信息。Wherein, the third type of license plate image information sequence includes the position information of the third type of candidate license plate images searched in the video frame images.

其中,第二分类器为:基于提取到的针对预定的第二样本图像集合中各个图像的局部二值模式LBP特征,并采用自适应提升算法Adaboost算法训练得到的分类器。与第一分类器相比,在训练或建立该第二分类器时所选取的样本图像集合不同,所提取的样本图像集合的特征不同。Wherein, the second classifier is: based on the extracted local binary pattern LBP feature for each image in the predetermined second sample image set, and adopting the adaptive boosting algorithm Adaboost algorithm to train the classifier. Compared with the first classifier, the set of sample images selected when training or establishing the second classifier is different, and the features of the set of sample images extracted are different.

需要说明的是,上面提及基于Adaboost算法训练出的分类器仅仅是举例,本发明并不需要对建立分类器的具体算法进行限定,当然还可以有其他建立分类器的方式,例如,基于支持向量机SVM的分类器建立方法,任何可能的实现方式均可以应用于本发明,本领域内的技术人员需要根据实际情况来确定具体采用何种方式来建立分类器。It should be noted that the classifiers trained based on the Adaboost algorithm mentioned above are only examples, and the present invention does not need to limit the specific algorithm for establishing classifiers. Of course, there can also be other ways of establishing classifiers, for example, based on support The method for establishing a classifier of a vector machine SVM, any possible implementation manner can be applied to the present invention, and those skilled in the art need to determine which method to use to establish a classifier according to the actual situation.

步骤S112:基于所述第三类候选车牌图像的位置信息,确定所述视频帧图像中的第三类候选车牌图像。Step S112: Based on the position information of the third type of candidate license plate images, determine the third type of candidate license plate images in the video frame images.

步骤S113:计算所述第三类候选车牌图像的第三类车牌相似值,并筛选出第三类车牌相似值中的最大值。Step S113: Calculate the third type of license plate similarity values of the third type of candidate license plate images, and filter out the maximum value among the third type of license plate similarity values.

步骤S114:判断筛选得到的第三类车牌相似值的最大值是否大于预设的第三相似度阈值;在判断结果为大于时,根据预设的第三有效车牌定位规则和所计算得到的第三类车牌相似值,从所述第三类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定通过所述第一分类器和第二分类器未定位到有效车牌图像。Step S114: Judging whether the maximum value of the similarity value of the third type of license plate obtained through screening is greater than the preset third similarity threshold; Three types of license plate similarity values, at least one valid license plate image is located from the third type of candidate license plate image, and when the judgment result is not greater than, it is determined that no valid license plate has been located by the first classifier and the second classifier image.

需要说明的是,步骤S112-S114与步骤S102-S104类似,此处不再赘述。It should be noted that steps S112-S114 are similar to steps S102-S104 and will not be repeated here.

本发明实施例通过设计多级筛选机制的多个串联的分类器,提取摄像头所拍摄到的视频帧图像中的图像的多个特征构成的综合特征,大大提高了利用单一特征定位车牌时容易出现的车牌定位失败或者漏检的情况,同时,当视频帧图像输入提取的哈尔Haar特征输入至第一分类器后未定位到满足条件的候选车牌图像时,进一步对该视频帧图像进行了多次旋转,将旋转后的图像再次输入至第一分类器,这样能够提高因图像拍摄角度所带来的定位失败或漏检的情况,显然,通过层层的分类器对该视频帧图像中的候选车牌图像的搜索,提高了准确定位车牌的可能性,降低了定位失败或者漏检情况的机率。In the embodiment of the present invention, by designing a plurality of series-connected classifiers of a multi-level screening mechanism, a comprehensive feature composed of multiple features of the image in the video frame image captured by the camera is extracted, which greatly improves the possibility of using a single feature to locate the license plate. At the same time, when the Haar feature extracted from the video frame image input is input to the first classifier and the candidate license plate image that meets the conditions is not located, the video frame image is further multiplexed. The rotated image is input to the first classifier again, which can improve the positioning failure or missed detection caused by the image shooting angle. Obviously, through the layer-by-layer classifier, the video frame image The search of candidate license plate images improves the possibility of accurately locating the license plate and reduces the probability of positioning failure or missed detection.

参见图3,为了提高车牌图像定位的准确性,在图1所示的车牌定位方法的基础之上,还可以包括以下步骤:Referring to Figure 3, in order to improve the accuracy of license plate image location, on the basis of the license plate location method shown in Figure 1, the following steps may also be included:

步骤S115:将所述Haar特征输入至预先建立的第三分类器中,得到与所述视频帧图像对应的第四类车牌图像信息序列。Step S115: Input the Haar feature into the pre-established third classifier to obtain the fourth type of license plate image information sequence corresponding to the video frame image.

其中,第四类车牌图像信息序列中包含视频帧图像中搜索到的第四类候选车牌图像的位置信息。Wherein, the fourth type of license plate image information sequence includes the position information of the fourth type of candidate license plate images searched in the video frame images.

其中,第三分类器为:基于提取到的针对预定的第三样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器。与第一分类器相比,在训练或建立该第三分类器时所选取的样本图像集合不同,所提取的样本图像集合的特征相同。Wherein, the third classifier is: based on the extracted Haar features for each image in the predetermined third sample image set, and using the adaptive boosting algorithm Adaboost algorithm to train the classifier. Compared with the first classifier, the sample image sets selected when training or establishing the third classifier are different, and the features of the extracted sample image sets are the same.

另外,在分类器的训练或建立过程中,最好使训练的样本图像尽可能的大,样本图像尽可能的多样化,这样,在实际应用中所建立的分类器的效率就越好。In addition, in the process of training or establishing the classifier, it is best to make the training sample images as large as possible and the sample images as diverse as possible, so that the efficiency of the classifier established in practical applications is better.

在本发明的一种具体实现方式中,可以通过如下方式建立第三分类器:首先,选取用于训练分类器的正负样本,其中,车牌图像(正样本)3000幅,非车牌图像(负样本)10000幅;然后,提出正负样本中每幅图像的Haar特征;最后,将提取得到的Haar特征输入至OpenCV自带的Adaboost分类器训练程序中运行,根据所建立的分类器的虚警率(即:将非车牌图像定位成了车牌图像)、命中率等参数来优化所建立的分类器。In a specific implementation of the present invention, the third classifier can be established in the following manner: first, select positive and negative samples for training the classifier, wherein, there are 3000 license plate images (positive samples) and 3000 non-license plate images (negative samples). samples) 10,000 images; then, the Haar feature of each image in the positive and negative samples is proposed; finally, the extracted Haar feature is input into the Adaboost classifier training program that comes with OpenCV, and according to the false alarm of the established classifier Rate (that is: positioning the non-license plate image as the license plate image), hit rate and other parameters to optimize the established classifier.

需要说明的是,上面提及基于Adaboost算法训练出的分类器仅仅是举例,本发明并不需要对建立分类器的具体算法进行限定,当然还可以有其他建立分类器的方式,例如,基于支持向量机SVM的分类器建立方法,任何可能的实现方式均可以应用于本发明,本领域内的技术人员需要根据实际情况来确定具体采用何种方式来建立分类器。It should be noted that the classifiers trained based on the Adaboost algorithm mentioned above are only examples, and the present invention does not need to limit the specific algorithm for establishing classifiers. Of course, there can also be other ways of establishing classifiers, for example, based on support The method for establishing a classifier of a vector machine SVM, any possible implementation manner can be applied to the present invention, and those skilled in the art need to determine which method to use to establish a classifier according to the actual situation.

步骤S116:基于所述第四类候选车牌图像的位置信息,确定所述视频帧图像中的第四类候选车牌图像。Step S116: Based on the position information of the fourth type of candidate license plate images, determine the fourth type of candidate license plate images in the video frame images.

步骤S117:计算所述第四类候选车牌图像的第四类车牌相似值,并筛选出第四类车牌相似值中的最大值。Step S117: Calculate the fourth-type license plate similarity values of the fourth-type candidate license plate images, and filter out the maximum value among the fourth-type license plate similarity values.

步骤S118:判断筛选得到的第四类车牌相似值中的最大值是否大于预设的第四相似度阈值;在判断结果为大于时,根据预设的第四有效车牌定位规则和所计算得到的第四类车牌相似值,从所述第四类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定通过所述第一分类器、第二分类器和第三分类器未定位到有效车牌图像。Step S118: Judging whether the maximum value among the similarity values of the fourth type of license plate obtained by screening is greater than the preset fourth similarity threshold; The fourth type of license plate similarity value, at least one valid license plate image is located from the fourth type of candidate license plate images, and when the judgment result is not greater than, it is determined that the first classifier, the second classifier and the third classifier The device does not locate a valid license plate image.

需要说明的是,步骤S116-S118与步骤S102-S104类似,此处不再赘述。It should be noted that steps S116-S118 are similar to steps S102-S104, and will not be repeated here.

本发明实施例通过设计多级筛选机制的多个串联的分类器,提取摄像头所拍摄到的视频帧图像中的图像的多个特征构成的综合特征,大大提高了利用单一特征定位车牌时容易出现的车牌定位失败或者漏检的情况,同时,当视频帧图像输入提取的哈尔Haar特征输入至第一分类器后未定位到满足条件的候选车牌图像时,进一步对该视频帧图像进行了多次旋转,将旋转后的图像再次输入至第一分类器,这样能够提高因图像拍摄角度所带来的定位失败或漏检的情况,显然,通过层层的分类器对该视频帧图像中的候选车牌图像的搜索,提高了准确定位车牌的可能性,降低了定位失败或者漏检情况的机率。In the embodiment of the present invention, by designing a plurality of series-connected classifiers of a multi-level screening mechanism, a comprehensive feature composed of multiple features of the image in the video frame image captured by the camera is extracted, which greatly improves the possibility of using a single feature to locate the license plate. At the same time, when the Haar feature extracted from the video frame image input is input to the first classifier and the candidate license plate image that meets the conditions is not located, the video frame image is further multiplexed. The rotated image is input to the first classifier again, which can improve the positioning failure or missed detection caused by the image shooting angle. Obviously, through the layer-by-layer classifier, the video frame image The search of candidate license plate images improves the possibility of accurately locating the license plate and reduces the probability of positioning failure or missed detection.

进一步的,参见图4,在图3所示的车牌定位方法的基础之上,还可以包括以下步骤:Further, referring to Fig. 4, on the basis of the license plate location method shown in Fig. 3, the following steps may also be included:

步骤S119:将所述Haar特征输入至预先建立的第四分类器中,得到与所述视频帧图像对应的第五类车牌图像信息序列。Step S119: Input the Haar feature into the pre-established fourth classifier to obtain the fifth type of license plate image information sequence corresponding to the video frame image.

其中,第五类车牌图像信息序列中包含视频帧图像中搜索到的第五类候选车牌图像的位置信息。Wherein, the fifth type of license plate image information sequence includes the position information of the fifth type of candidate license plate images searched in the video frame images.

其中,第四分类器为:基于提取到的针对第四样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器。与第一分类器相比,在训练或建立该第四分类器时所选取的样本图像集合不同,所提取的样本图像集合的特征相同。Wherein, the fourth classifier is: based on the extracted Haar features for each image in the fourth sample image set, and using the adaptive boosting algorithm Adaboost algorithm to train the classifier. Compared with the first classifier, the sample image sets selected when training or establishing the fourth classifier are different, and the features of the sample image sets extracted are the same.

另外,在分类器的训练或建立过程中,最好使训练的样本图像的数量尽可能的大,样本图像尽可能的多样化,这样,在实际应用中所建立的分类器的效率就越好。In addition, in the process of training or establishing the classifier, it is best to make the number of training sample images as large as possible, and the sample images are as diverse as possible, so that the efficiency of the classifier established in practical applications is better. .

在本发明的一种具体实现方式中,可以通过如下方式建立第四分类器:首先,选取用于训练分类器的正负样本,其中,车牌图像(正样本)2000幅,并且该车牌图像中的正样本全部为双排车牌图像,非车牌图像(负样本)10000幅;然后,提出正负样本中每幅图像的Haar特征;最后,将提取得到的Haar特征输入至OpenCV自带的Adaboost分类器训练程序中运行,根据所建立的分类器的虚警率(即:将非车牌图像定位成了车牌图像)、命中率等参数来优化所建立的分类器。In a specific implementation of the present invention, the fourth classifier can be established in the following manner: first, select positive and negative samples for training the classifier, wherein, there are 2000 license plate images (positive samples), and the license plate images All positive samples are double-row license plate images, and 10,000 non-license plate images (negative samples); then, the Haar features of each image in the positive and negative samples are proposed; finally, the extracted Haar features are input to the Adaboost classification that comes with OpenCV Operate in the machine training program, optimize the established classifier according to the false alarm rate of the established classifier (that is: the non-license plate image is positioned as the license plate image), hit rate and other parameters.

需要说明的是,上面提及基于Adaboost算法训练出的分类器仅仅是举例,本发明并不需要对建立分类器的具体算法进行限定,当然还可以有其他建立分类器的方式,例如,基于支持向量机SVM的分类器建立方法,任何可能的实现方式均可以应用于本发明,本领域内的技术人员需要根据实际情况来确定具体采用何种方式来建立分类器。It should be noted that the classifiers trained based on the Adaboost algorithm mentioned above are only examples, and the present invention does not need to limit the specific algorithm for establishing classifiers. Of course, there can also be other ways of establishing classifiers, for example, based on support The method for establishing a classifier of a vector machine SVM, any possible implementation manner can be applied to the present invention, and those skilled in the art need to determine which method to use to establish a classifier according to the actual situation.

步骤S120:基于所述第五类候选车牌图像的位置信息,确定所述视频帧图像中的第五类候选车牌图像。Step S120: Based on the position information of the fifth type of candidate license plate images, determine the fifth type of candidate license plate images in the video frame images.

步骤S121:计算所述第五类候选车牌图像的第五类车牌相似值,并筛选出第五类车牌相似值中的最大值。Step S121: Calculate the fifth type of license plate similarity values of the fifth type of candidate license plate images, and filter out the maximum value among the fifth type of license plate similarity values.

步骤S122:判断筛选得到的第五类车牌相似值中的最大值是否大于预设的第五相似度阈值;在判断结果为大于时,根据预设的第五有效车牌定位规则和所计算得到的第五类车牌相似值,从所述第五类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定未定位到有效车牌图像。Step S122: Judging whether the maximum value among the similarity values of the fifth type of license plate obtained by screening is greater than the preset fifth similarity threshold; For the fifth type of license plate similarity value, at least one valid license plate image is located from the fifth type of candidate license plate images, and when the judgment result is not greater than that, it is determined that no valid license plate image has been located.

需要说明的是,步骤S120-S122与步骤S102-S104类似,此处不再赘述。It should be noted that steps S120-S122 are similar to steps S102-S104 and will not be repeated here.

本发明实施例通过设计多级筛选机制的多个串联的分类器,提取摄像头所拍摄到的视频帧图像中的图像的多个特征构成的综合特征,大大提高了利用单一特征定位车牌时容易出现的车牌定位失败或者漏检的情况,同时,当视频帧图像输入提取的哈尔Haar特征输入至第一分类器后未定位到满足条件的候选车牌图像时,进一步对该视频帧图像进行了多次旋转,将旋转后的图像再次输入至第一分类器,这样能够提高因图像拍摄角度所带来的定位失败或漏检的情况,显然,通过层层的分类器对该视频帧图像中的候选车牌图像的搜索,提高了准确定位车牌的可能性,降低了定位失败或者漏检情况的机率。In the embodiment of the present invention, by designing a plurality of series-connected classifiers of a multi-level screening mechanism, a comprehensive feature composed of multiple features of the image in the video frame image captured by the camera is extracted, which greatly improves the possibility of using a single feature to locate the license plate. At the same time, when the Haar feature extracted from the video frame image input is input to the first classifier and the candidate license plate image that meets the conditions is not located, the video frame image is further multiplexed. The rotated image is input to the first classifier again, which can improve the positioning failure or missed detection caused by the image shooting angle. Obviously, through the layer-by-layer classifier, the video frame image The search of candidate license plate images improves the possibility of accurately locating the license plate and reduces the probability of positioning failure or missed detection.

在本发明的一种具体实施例中,在图1所示的车牌定位的方法的基础之上,还可以进一步对定位到的有效车牌图像进行细定位处理,具体可以包括以下步骤:In a specific embodiment of the present invention, on the basis of the method for locating the license plate shown in Figure 1, the effective license plate image that is positioned can also be further finely positioned and processed, specifically the following steps can be included:

(1)对定位到的有效车牌图像进行去杂二值化处理,得到仅包含车牌部分的有效车牌图像;(1) Carry out decontamination binarization processing to the valid license plate image that locates, obtain the valid license plate image that only includes the license plate part;

(2)利用霍夫变换Hough变换对去杂后的有效车牌图像进行车牌区域的边缘检测,并提取出该车牌区域的边缘,参见图5,图5(a)和图5(b)为本发明实施例提供的霍夫变换后的结果示意图;(2) Utilize the Hough transform Hough transform to carry out the edge detection of the license plate area on the effective license plate image after decluttering, and extract the edge of the license plate area, see Fig. 5, Fig. 5 (a) and Fig. 5 (b) are this The schematic diagram of the results after the Hough transform provided by the embodiment of the invention;

(3)根据提取到的车牌区域的边缘,计算出车牌区域在水平和/或竖直方向倾斜角;(3) According to the edge of the license plate area extracted, calculate the license plate area in the horizontal and/or vertical direction inclination angle;

(4)基于计算得到的倾斜角,对车牌区域的图像进行水平校正与错切校正处理,获得校正后的车牌图像;(4) Based on the calculated inclination angle, perform horizontal correction and miscut correction processing on the image of the license plate area to obtain the corrected license plate image;

(5)对所获得的校正后的车牌图像在竖直方向上进行垂直方向梯度处理,确定出校正后的车牌图像的上下边界,同时,根据与预设阈值的比较初步确定出校正后的车牌图像的左右边界;(5) Perform vertical gradient processing on the obtained corrected license plate image in the vertical direction to determine the upper and lower boundaries of the corrected license plate image, and at the same time, preliminarily determine the corrected license plate according to the comparison with the preset threshold The left and right borders of the image;

(6)利用洪泛法去除所确定出的上下左右四个边界中的边缘碎块,对所确定出的车牌图像的上下左右四个边界进行了优化处理。(6) Using the flooding method to remove the edge fragments in the four determined upper, lower, left, and right boundaries, and optimized the determined upper, lower, left, and right boundaries of the license plate image.

其中,本发明中所提及的“去杂二值化处理”,主要可以包括以下步骤:Wherein, the "removal of impurities and binarization processing" mentioned in the present invention may mainly include the following steps:

1)根据拓宽后的车牌图像的灰度图中的顶部区域的像素点的像素值之和的大小来判断该车牌图像所对应的车身颜色是否为浅色。1) Determine whether the vehicle body color corresponding to the license plate image is a light color according to the sum of the pixel values of the pixels in the top area of the grayscale image of the license plate image after widening.

在本发明的一种具体实现方式中,可以将已确定出上下左右四个边界的车牌图像分别在上下向上拓宽0.125倍的车牌高度且在左右方向上拓宽0.125倍的车牌宽度;设定拓宽后的车牌图像顶部0.125倍高度部分图像的灰度值之和,若大于该区域图像大小全部为纯白像素点255情况下灰度值之和的50%时,判断为浅色车身,否则判断为深色车身。In a specific implementation of the present invention, the license plate image that has determined the four boundaries of up, down, left, and right can be expanded by 0.125 times the license plate height up, down, and up, and 0.125 times the license plate width in the left and right direction; after setting the widened If the sum of the gray value of the image at the top 0.125 times the height of the license plate image is greater than 50% of the sum of the gray value when the size of the image in this area is all pure white pixels 255, it is judged as a light-colored body, otherwise it is judged as Dark body.

2)根据所获得的车身颜色,对该车牌图像所对应的有效车牌图像进行二值化处理,获得二值化图像A,参见图6(a)。2) According to the obtained vehicle body color, binarize the valid license plate image corresponding to the license plate image to obtain a binarized image A, see FIG. 6( a ).

在本发明的一种具体的实现方式中,可以包括:In a specific implementation of the present invention, it may include:

在步骤1)中判断为浅色车身时,选取该车牌图像所对应的有效车牌图像的彩色图像在HSV颜色空间中的S通道,对该S通道所对应的有效车牌图像进行二值化处理;When being judged as light-colored vehicle body in step 1), select the S channel of the color image of the valid license plate image corresponding to this license plate image in the HSV color space, carry out binarization processing to the valid license plate image corresponding to this S channel;

在步骤1)中判断为深色车身时,需要结合车牌颜色进行如下处理:若为蓝色车牌,选取RGB颜色空间中的B通道所对应的有效车牌图像进行二值化处理,若为黄色车牌或白色车牌,选取RGB颜色空间中的G、R通道合并处理,并对合并后的有效车牌图像进行二值化处理。When it is judged as a dark car body in step 1), it needs to be processed in combination with the color of the license plate as follows: if it is a blue license plate, select the valid license plate image corresponding to the B channel in the RGB color space to perform binarization processing; if it is a yellow license plate Or a white license plate, select the G and R channels in the RGB color space to merge, and perform binarization on the combined effective license plate image.

3)选取该车牌图像所对应的有效车牌图像的彩色图像的Lab颜色空间中的b通道,并进行二值化处理,获得二值化图像B,参见图6(b)。3) Select the b channel in the Lab color space of the color image of the effective license plate image corresponding to the license plate image, and perform binarization processing to obtain a binarized image B, see FIG. 6(b).

4)将步骤2)中得到的二值化图像A与步骤3)中得到的二值化图像B中处于对应位置的像素点进行比较,若对应位置的像素点的像素值一致,则将二值化图像A中对应的像素点的像素值设置为255。4) Compare the binary image A obtained in step 2) with the pixel at the corresponding position in the binary image B obtained in step 3), if the pixel values of the corresponding pixel are consistent, then the two The pixel value of the corresponding pixel in the valued image A is set to 255.

5)计算步骤4)处理后的二值化图像A中的空白像素点所占的比值,当该比值大于预设的空白阈值时,确定用二值化图像B来代替二值化图像A来进行后续处理,参见图6(c),否则仍用二值化图像A进行后续处理。5) Calculating step 4) the ratio of the blank pixels in the processed binary image A, when the ratio is greater than the preset blank threshold, it is determined to replace the binary image A with the binary image B For subsequent processing, see Figure 6(c), otherwise the binary image A is still used for subsequent processing.

优选的,预设的空白阈值可以设置为90%。当然,本发明并不需要对该阈值的具体数值进行限定,本领域内的技术人员需要根据实际应用中的具体情况进行合理的设置。Preferably, the preset blank threshold can be set to 90%. Of course, the present invention does not need to limit the specific value of the threshold, and those skilled in the art need to set it reasonably according to the actual situation in the actual application.

6)将步骤5)中确定出的二值化图像利用洪泛法去除该图像中的非连通杂项区域,参见图6(d),完成对定位到的有效车牌图像的细定位处理。6) Use the flooding method to remove the non-connected miscellaneous areas in the binarized image determined in step 5), see FIG. 6(d), and complete the fine positioning processing of the located effective license plate image.

图7为本发明实施例提供的一种车牌定位装置的结构示意图,该装置可以包括以下模块:Fig. 7 is a schematic structural diagram of a license plate positioning device provided by an embodiment of the present invention, the device may include the following modules:

第一车牌序列获得模块201,用于提取待定位车牌的视频帧图像的哈尔Haar特征,并将所述Haar特征输入至预先建立的第一分类器中,得到与所述视频帧图像对应的第一类车牌图像信息序列。The first license plate sequence obtaining module 201 is used to extract the Haar Haar feature of the video frame image of the license plate to be located, and input the Haar feature into the pre-established first classifier to obtain the corresponding image of the video frame The first type of license plate image information sequence.

其中,第一类车牌图像信息序列中包含视频帧图像中搜索到的第一类候选车牌图像的位置信息。Wherein, the first type of license plate image information sequence includes the position information of the first type of candidate license plate images searched in the video frame images.

其中,第一分类器为:基于提取到的针对预定的第一样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器。Wherein, the first classifier is: based on the extracted Haar features for each image in the predetermined first sample image set, and using the adaptive boosting algorithm Adaboost algorithm to train the classifier.

第一车牌图像确定模块202,用于基于所述第一类候选车牌图像的位置信息,确定所述视频帧图像中的第一类候选车牌图像。The first license plate image determining module 202 is configured to determine the first type of candidate license plate images in the video frame images based on the position information of the first type of candidate license plate images.

第一车牌相似度计算模块203,用于计算所述第一类候选车牌图像的第一类车牌相似值,并筛选出第一类车牌相似值中的最大值。The first license plate similarity calculation module 203 is configured to calculate the first type of license plate similarity values of the first type of candidate license plate images, and filter out the maximum value among the first type of license plate similarity values.

在本发明的一种具体实现方式中,第一车牌相似度计算模块203,可以用于:In a specific implementation of the present invention, the first license plate similarity calculation module 203 can be used for:

A:对第一类候选车牌图像进行二值化处理;A: Perform binarization processing on the first type of candidate license plate images;

B:对二值化处理后得到的第一类候选车牌图像进行开运算形态学变换;B: Perform open operation morphological transformation on the first type of candidate license plate images obtained after binarization processing;

C:通过Sobel算法对经开运算形态学变换后的第一类候选车牌图像进行垂直滤波处理,得到开运算形态学变换后的第一类候选车牌图像的第一类垂直梯度图像;C: Carry out vertical filtering processing on the first type candidate license plate image after the opening operation morphological transformation by Sobel algorithm, and obtain the first type vertical gradient image of the first type candidate license plate image after the opening operation morphological transformation;

D:通过Canny算法对所述第一类垂直梯度图像进行边缘检测,获得第一类边缘图像;D: performing edge detection on the first type of vertical gradient image by the Canny algorithm to obtain the first type of edge image;

E:针对所述第一类边缘图像中提取到的边缘按照垂直方向进行六等分,计算每一等分中边缘部分像素点在水平方向的跳变均值;E: For the edge extracted in the first type of edge image, the edge is divided into six equal parts according to the vertical direction, and the average jump value of the pixel points in the edge part in the horizontal direction is calculated in each equal part;

其中,由于通过步骤D检测得到的边缘图像中,边缘部分为的像素点的像素值为255,非边缘部分的像素点的像素值为0。因此,当从步骤E六等分之后得到的任一高度,按照从首至尾的顺序遍历该行像素点时,就会出现黑白点的交替变换,当连续两个像素点的像素值不同时就记为一次跳变,统计该行跳变次数,就能够得到每一等分中边缘部分像素点在水平方向的跳变均值。Wherein, in the edge image obtained through the detection in step D, the pixel value of the pixel point in the edge part is 255, and the pixel value of the pixel point in the non-edge part is 0. Therefore, when traversing the row of pixels in order from the beginning to the end of any height obtained after the six equal parts of step E, there will be an alternate transformation of black and white points. When the pixel values of two consecutive pixels are different It is recorded as a jump, and the number of jumps in this line is counted to obtain the average value of the jumps in the horizontal direction of the edge part pixels in each aliquot.

F:计算所述跳变均值的平均值,将计算得到的所述平均值确定为所述第一类候选车牌图像的第一类车牌相似值。F: Calculate the average value of the transition average value, and determine the calculated average value as the first type of license plate similarity value of the first type of candidate license plate image.

需要说明的是,上述计算任一第一类候选车牌图像的第一类车牌相似值的过程仅仅是举例,本发明实施例不需要对车牌相似值的计算过程进行限定,任何可能的实现方式均可以应用于本发明。It should be noted that the above-mentioned process of calculating the first-type license plate similarity value of any first-type candidate license plate image is just an example, and the embodiment of the present invention does not need to limit the calculation process of the license plate similarity value, and any possible implementation methods are can be applied to the present invention.

第一车牌相似度判断模块204,用于判断筛选得到的第一类车牌相似值中的最大值是否大于预设的第一相似度阈值;在判断结果为大于时,触发第一车牌定位子模块205,否则触发第二车牌序列获得模块206。The first license plate similarity judging module 204 is used to judge whether the maximum value in the first type of license plate similarity obtained by screening is greater than the preset first similarity threshold; when the judgment result is greater than, trigger the first license plate location submodule 205, otherwise trigger the second license plate sequence obtaining module 206.

第一车牌定位子模块205,用于根据预设的第一有效车牌定位规则和所计算得到的第一类车牌相似值,从所述第一类候选车牌图像中定位到至少一个有效车牌图像。The first license plate location sub-module 205 is configured to locate at least one valid license plate image from the first type of candidate license plate images according to the preset first valid license plate location rule and the calculated similarity value of the first type of license plate.

其中,第一车牌定位子模块205,具体用于:Wherein, the first license plate positioning submodule 205 is specifically used for:

将所述第一类车牌相似值中的最大值所对应的第一类候选车牌图像确定为定位到的有效车牌图像;或将所述第一类车牌相似值中,大于预设的第一定位阈值的第一类车牌相似值所对应的第一类候选车牌图像确定为定位到有效车牌图像。Determining the first type of candidate license plate image corresponding to the maximum value of the first type of license plate similarity value as the located valid license plate image; The first type of candidate license plate image corresponding to the first type of license plate similarity value of the threshold is determined to be a valid license plate image.

第二车牌序列获得模块206,用于根据预设的图像旋转规则,对所述视频帧图像进行N次旋转,将每一次旋转后所得的视频帧图像再次输入至所述第一分类器中,获得N个第二类车牌图像信息序列。The second license plate sequence obtaining module 206 is configured to perform N rotations on the video frame image according to a preset image rotation rule, and re-input the video frame image obtained after each rotation into the first classifier, Obtain N second-type license plate image information sequences.

第二车牌图像确定模块207,用于基于所述第二类车牌图像信息序列中的第二类候选车牌图像的位置信息,确定所述视频帧图像中的第二类候选车牌图像。The second license plate image determining module 207 is configured to determine the second type of candidate license plate images in the video frame images based on the position information of the second type of candidate license plate images in the second type of license plate image information sequence.

第二车牌相似度计算模块208,用于计算每一第二类车牌图像信息序列所对应的第二类候选车牌图像的第二类车牌相似值,并筛选出每一第二类车牌图像信息序列所对应的第二类候选车牌图像的第二类车牌相似值中的最大值,进而,从筛选得到的各个第二类车牌相似值中的最大值中,确定出数值最大的目标第二类车牌相似值。The second license plate similarity calculation module 208 is used to calculate the second type of license plate similarity value of the second type of candidate license plate image corresponding to each second type of license plate image information sequence, and filter out each second type of license plate image information sequence The maximum value of the second-type license plate similarity value of the corresponding second-type candidate license plate image, and then, from the maximum value among the second-type license plate similarity values obtained by screening, determine the target second-type license plate with the largest value similar value.

第二车牌相似度判断模块209,用于判断所述目标第二类车牌相似值是否大于预设的第二相似度阈值,如果大于,触发第二车牌定位子模块210,否则触发第三车牌序列获得模块211。The second license plate similarity judging module 209 is used to judge whether the target second type of license plate similarity value is greater than the preset second similarity threshold, if greater, trigger the second license plate positioning submodule 210, otherwise trigger the third license plate sequence Obtain module 211 .

第二车牌定位子模块210,用于根据预设的第二有效车牌定位规则和所计算得到的第二类车牌相似值,从所述目标第二类车牌相似值所对应的第二类车牌图像信息序列所针对的第二类候选车牌图像中定位到至少一个有效车牌图像。The second license plate location sub-module 210 is used to obtain the second type of license plate image corresponding to the target second type of license plate similarity value according to the preset second valid license plate location rule and the calculated similarity value of the second type of license plate. At least one valid license plate image is located in the second type of candidate license plate images targeted by the information sequence.

第三车牌序列获得模块211,用于继续提取所述视频帧图像的局部二值模式LBP特征,并将所述LBP特征输入至预先建立的第二分类器中,得到与所述视频帧图像对应的第三类车牌图像信息序列。The third license plate sequence obtaining module 211 is used to continue to extract the local binary mode LBP feature of the video frame image, and input the LBP feature into the pre-established second classifier to obtain the corresponding image corresponding to the video frame image. The third type of license plate image information sequence.

其中,第三类车牌图像信息序列中包含视频帧图像中搜索到的第三类候选车牌图像的位置信息。Wherein, the third type of license plate image information sequence includes the position information of the third type of candidate license plate images searched in the video frame images.

其中,第二分类器为:基于提取到的针对预定的第二样本图像集合中各个图像的局部二值模式LBP特征,并采用自适应提升算法Adaboost算法训练得到的分类器。Wherein, the second classifier is: based on the extracted local binary pattern LBP feature for each image in the predetermined second sample image set, and adopting the adaptive boosting algorithm Adaboost algorithm to train the classifier.

第三车牌图像确定模块212,用于基于所述第三类候选车牌图像的位置信息,确定所述视频帧图像中的第三类候选车牌图像;A third license plate image determining module 212, configured to determine a third type of candidate license plate image in the video frame image based on the position information of the third type of candidate license plate image;

第三车牌相似度计算模块213,用于计算所述第三类候选车牌图像的第三类车牌相似值,并筛选出第三类车牌相似值中的最大值;The third license plate similarity calculation module 213 is used to calculate the third type of license plate similarity value of the third type of candidate license plate image, and filter out the maximum value in the third type of license plate similarity value;

第三车牌相似度判断模块214,用于判断筛选得到的第三类车牌相似值的最大值是否大于预设的第三相似度阈值;在判断结果为大于时,根据预设的第三有效车牌定位规则和所计算得到的第三类车牌相似值,从所述第三类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定通过所述第一分类器和第二分类器未定位到有效车牌图像。The third license plate similarity judging module 214, is used for judging whether the maximum value of the third type of license plate similarity obtained by screening is greater than the preset third similarity threshold; Positioning rules and the calculated similarity value of the third type of license plate, at least one valid license plate image is located from the third type of candidate license plate images, and when the judgment result is not greater than The binary classifier did not locate a valid license plate image.

本发明实施例通过设计多级筛选机制的多个串联的分类器,提取摄像头所拍摄到的视频帧图像中的图像的多个特征构成的综合特征,大大提高了利用单一特征定位车牌时容易出现的车牌定位失败或者漏检的情况,同时,当视频帧图像输入提取的哈尔Haar特征输入至第一分类器后未定位到满足条件的候选车牌图像时,进一步对该视频帧图像进行了多次旋转,将旋转后的图像再次输入至第一分类器,这样能够提高因图像拍摄角度所带来的定位失败或漏检的情况,显然,通过层层的分类器对该视频帧图像中的候选车牌图像的搜索,提高了准确定位车牌的可能性,降低了定位失败或者漏检情况的机率。In the embodiment of the present invention, by designing a plurality of series-connected classifiers of a multi-level screening mechanism, a comprehensive feature composed of multiple features of the image in the video frame image captured by the camera is extracted, which greatly improves the possibility of using a single feature to locate the license plate. At the same time, when the Haar feature extracted from the video frame image input is input to the first classifier and the candidate license plate image that meets the conditions is not located, the video frame image is further multiplexed. The rotated image is input to the first classifier again, which can improve the positioning failure or missed detection caused by the image shooting angle. Obviously, through the layer-by-layer classifier, the video frame image The search of candidate license plate images improves the possibility of accurately locating the license plate and reduces the probability of positioning failure or missed detection.

在本发明的一种具体实施例中,为了提高车牌图像定位的准确性,在图7所示的车牌定位装置的基础之上,还可以包括以下模块:In a specific embodiment of the present invention, in order to improve the accuracy of license plate image positioning, on the basis of the license plate positioning device shown in Figure 7, the following modules can also be included:

第四车牌序列获得模块,用于将所述Haar特征输入至预先建立的第三分类器中,得到与所述视频帧图像对应的第四类车牌图像信息序列。The fourth license plate sequence obtaining module is used to input the Haar feature into the pre-established third classifier to obtain the fourth type of license plate image information sequence corresponding to the video frame image.

其中,第四类车牌图像信息序列中包含视频帧图像中搜索到的第四类候选车牌图像的位置信息。Wherein, the fourth type of license plate image information sequence includes the position information of the fourth type of candidate license plate images searched in the video frame images.

其中,第三分类器为:基于提取到的针对预定的第三样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器。Wherein, the third classifier is: based on the extracted Haar features for each image in the predetermined third sample image set, and using the adaptive boosting algorithm Adaboost algorithm to train the classifier.

第四车牌图像确定模块,用于基于所述第四类候选车牌图像的位置信息,确定所述视频帧图像中的第四类候选车牌图像。The fourth license plate image determining module is configured to determine the fourth type of candidate license plate image in the video frame images based on the position information of the fourth type of candidate license plate image.

第四车牌相似度计算模块,用于计算所述第四类候选车牌图像的第四类车牌相似值,并筛选出第四类车牌相似值中的最大值。The fourth license plate similarity calculation module is used to calculate the fourth type of license plate similarity value of the fourth type of candidate license plate images, and select the maximum value among the fourth type of license plate similarity values.

第四车牌相似度判断模块,用于判断筛选得到的第四类车牌相似值中的最大值是否大于预设的第四相似度阈值;在判断结果为大于时,根据预设的第四有效车牌定位规则和所计算得到的第四类车牌相似值,从所述第四类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定通过所述第一分类器、第二分类器和第三分类器未定位到有效车牌图像。The fourth license plate similarity judging module is used to judge whether the maximum value in the fourth type of license plate similarity obtained by screening is greater than the preset fourth similarity threshold; when the judgment result is greater than, according to the preset fourth valid license plate Positioning rules and the calculated similarity value of the fourth type of license plate, at least one valid license plate image is located from the fourth type of candidate license plate image, and when the judgment result is not greater than, it is determined that the first classifier, the second The second classifier and the third classifier did not locate valid license plate images.

在本发明的另一种具体实施例中,该装置还可以进一步包括以下模块:In another specific embodiment of the present invention, the device may further include the following modules:

第五车牌序列获得模块,用于将所述Haar特征输入至预先建立的第四分类器中,得到与所述视频帧图像对应的第五类车牌图像信息序列。The fifth license plate sequence obtaining module is used to input the Haar feature into the pre-established fourth classifier to obtain the fifth type of license plate image information sequence corresponding to the video frame image.

其中,第五类车牌图像信息序列中包含视频帧图像中搜索到的第五类候选车牌图像的位置信息。Wherein, the fifth type of license plate image information sequence includes the position information of the fifth type of candidate license plate images searched in the video frame images.

其中,第四分类器为:基于提取到的针对第四样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器。Wherein, the fourth classifier is: based on the extracted Haar features for each image in the fourth sample image set, and using the adaptive boosting algorithm Adaboost algorithm to train the classifier.

第五车牌图像确定模块,用于基于所述第五类候选车牌图像的位置信息,确定所述视频帧图像中的第五类候选车牌图像。The fifth license plate image determination module is configured to determine the fifth type of candidate license plate images in the video frame images based on the position information of the fifth type of candidate license plate images.

第五车牌相似度计算模块,用于计算所述第五类候选车牌图像的第五类车牌相似值,并筛选出第五类车牌相似值中的最大值。The fifth license plate similarity calculation module is used to calculate the fifth type of license plate similarity value of the fifth type of candidate license plate images, and select the maximum value among the fifth type of license plate similarity values.

第五车牌相似度判断模块,用于判断筛选得到的第五类车牌相似值中的最大值是否大于预设的第五相似度阈值;在判断结果为大于时,根据预设的第五有效车牌定位规则和所计算得到的第五类车牌相似值,从所述第五类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定未定位到有效车牌图像。The fifth license plate similarity judging module is used to judge whether the maximum value in the fifth type of license plate similarity value obtained by screening is greater than the preset fifth similarity threshold; when the judgment result is greater than, according to the preset fifth valid license plate Based on the location rule and the calculated similarity value of the fifth type of license plate, at least one valid license plate image is located from the fifth type of candidate license plate images, and when the judgment result is not greater than that, it is determined that no valid license plate image has been located.

本发明实施例通过设计多级筛选机制的多个串联的分类器,提取摄像头所拍摄到的视频帧图像中的图像的多个特征构成的综合特征,大大提高了利用单一特征定位车牌时容易出现的车牌定位失败或者漏检的情况,同时,当视频帧图像输入提取的哈尔Haar特征输入至第一分类器后未定位到满足条件的候选车牌图像时,进一步对该视频帧图像进行了多次旋转,将旋转后的图像再次输入至第一分类器,这样能够提高因图像拍摄角度所带来的定位失败或漏检的情况,显然,通过层层的分类器对该视频帧图像中的候选车牌图像的搜索,提高了准确定位车牌的可能性,降低了定位失败或者漏检情况的机率。In the embodiment of the present invention, by designing a plurality of series-connected classifiers of a multi-level screening mechanism, a comprehensive feature composed of multiple features of the image in the video frame image captured by the camera is extracted, which greatly improves the possibility of using a single feature to locate the license plate. At the same time, when the Haar feature extracted from the video frame image input is input to the first classifier and the candidate license plate image that meets the conditions is not located, the video frame image is further multiplexed. The rotated image is input to the first classifier again, which can improve the positioning failure or missed detection caused by the image shooting angle. Obviously, through the layer-by-layer classifier, the video frame image The search of candidate license plate images improves the possibility of accurately locating the license plate and reduces the probability of positioning failure or missed detection.

对于系统或装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the system or device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for related parts, please refer to part of the description of the method embodiments.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. any such actual relationship or order exists between them. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

本领域普通技术人员可以理解实现上述方法实施方式中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于计算机可读取存储介质中,这里所称得的存储介质,如:ROM/RAM、磁碟、光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the implementation of the above method can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, referred to herein as Storage media, such as: ROM/RAM, disk, CD, etc.

以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present invention are included in the protection scope of the present invention.

Claims (10)

1.一种车牌定位方法,其特征在于,所述方法包括:1. A license plate location method, characterized in that said method comprises: 提取待定位车牌的视频帧图像的哈尔Haar特征,并将所述Haar特征输入至预先建立的第一分类器中,得到与所述视频帧图像对应的第一类车牌图像信息序列,其中,所述第一类车牌图像信息序列中包含视频帧图像中搜索到的第一类候选车牌图像的位置信息,所述第一分类器为:基于提取到的针对预定的第一样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器;Extract the Haar Haar feature of the video frame image of the license plate to be located, and input the Haar feature into the pre-established first classifier to obtain the first type of license plate image information sequence corresponding to the video frame image, wherein, The first type of license plate image information sequence includes the position information of the first type of candidate license plate image searched in the video frame image, and the first classifier is: based on the extracted first sample image set for a predetermined The Haar features of each image, and the classifier trained by the adaptive promotion algorithm Adaboost algorithm; 基于所述第一类候选车牌图像的位置信息,确定所述视频帧图像中的第一类候选车牌图像;Based on the position information of the first type of candidate license plate images, determine the first type of candidate license plate images in the video frame images; 计算所述第一类候选车牌图像的第一类车牌相似值,并筛选出第一类车牌相似值中的最大值;Calculate the first type of license plate similarity value of the first type of candidate license plate image, and filter out the maximum value in the first type of license plate similarity value; 判断筛选得到的第一类车牌相似值中的最大值是否大于预设的第一相似度阈值:Judging whether the maximum value of the similarity values of the first type of license plate obtained by screening is greater than the preset first similarity threshold: 在判断结果为大于时,根据预设的第一有效车牌定位规则和所计算得到的第一类车牌相似值,从所述第一类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,根据预设的图像旋转规则,对所述视频帧图像进行N次旋转,将每一次旋转后所得的视频帧图像再次输入至所述第一分类器中,获得N个第二类车牌图像信息序列,基于所述第二类车牌图像信息序列中的第二类候选车牌图像的位置信息,确定所述视频帧图像中的第二类候选车牌图像,计算每一第二类车牌图像信息序列所对应的第二类候选车牌图像的第二类车牌相似值,并筛选出每一第二类车牌图像信息序列所对应的第二类候选车牌图像的第二类车牌相似值中的最大值,进而,从筛选得到的各个第二类车牌相似值中的最大值中,确定出数值最大的目标第二类车牌相似值,判断所述目标第二类车牌相似值是否大于预设的第二相似度阈值,如果大于,根据预设的第二有效车牌定位规则和所计算得到的第二类车牌相似值,从所述目标第二类车牌相似值所对应的第二类车牌图像信息序列所针对的第二类候选车牌图像中定位到至少一个有效车牌图像,如果不大于,则When the judgment result is greater than, at least one effective license plate image is located from the first type of candidate license plate images according to the preset first valid license plate location rule and the calculated similarity value of the first type of license plate. When is not greater than, according to the preset image rotation rules, the video frame image is rotated N times, and the video frame image obtained after each rotation is re-inputted into the first classifier to obtain N second classifiers. A similar license plate image information sequence, based on the position information of the second type of candidate license plate image in the second type of license plate image information sequence, determine the second type of candidate license plate image in the video frame image, and calculate each second type of license plate image The second type of license plate similarity value of the second type of candidate license plate image corresponding to the image information sequence, and filter out the second type of license plate similarity value of the second type of candidate license plate image corresponding to each second type of license plate image information sequence The maximum value, and then, from the maximum value among the second-type license plate similarity values obtained by screening, determine the target second-type license plate similarity value with the largest value, and judge whether the target second-type license plate similarity value is greater than the preset If the second similarity threshold is greater than the second type of license plate image information corresponding to the target second type of license plate similarity value, according to the preset second valid license plate location rule and the calculated second type of license plate similarity value At least one valid license plate image is located in the second type of candidate license plate images targeted by the sequence, if not greater than 继续提取所述视频帧图像的局部二值模式LBP特征,并将所述LBP特征输入至预先建立的第二分类器中,得到与所述视频帧图像对应的第三类车牌图像信息序列,其中,所述第三类车牌图像信息序列中包含视频帧图像中搜索到的第三类候选车牌图像的位置信息,所述第二分类器为:基于提取到的针对预定的第二样本图像集合中各个图像的局部二值模式LBP特征,并采用自适应提升算法Adaboost算法训练得到的分类器;Continue to extract the local binary pattern LBP feature of the video frame image, and input the LBP feature into the pre-established second classifier to obtain the third type of license plate image information sequence corresponding to the video frame image, wherein , the third type of license plate image information sequence includes the position information of the third type of candidate license plate image searched in the video frame image, and the second classifier is: based on the extracted second sample image set for a predetermined The local binary mode LBP feature of each image, and the classifier obtained by using the adaptive promotion algorithm Adaboost algorithm training; 基于所述第三类候选车牌图像的位置信息,确定所述视频帧图像中的第三类候选车牌图像;determining a third type of candidate license plate image in the video frame image based on the position information of the third type of candidate license plate image; 计算所述第三类候选车牌图像的第三类车牌相似值,并筛选出第三类车牌相似值中的最大值;Calculate the third type of license plate similarity value of the third type of candidate license plate image, and filter out the maximum value in the third type of license plate similarity value; 判断筛选得到的第三类车牌相似值的最大值是否大于预设的第三相似度阈值;在判断结果为大于时,根据预设的第三有效车牌定位规则和所计算得到的第三类车牌相似值,从所述第三类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定通过所述第一分类器和第二分类器未定位到有效车牌图像。Judging whether the maximum value of the similarity value of the third type of license plate obtained by screening is greater than the preset third similarity threshold; when the judgment result is greater than, according to the preset third valid license plate positioning rule and the calculated third type of license plate Similarity value, at least one valid license plate image is located from the third type of candidate license plate images, and when the judgment result is not greater than, it is determined that no valid license plate image has been located by the first classifier and the second classifier. 2.根据权利要求1所述的方法,其特征在于,计算任一第一类候选车牌图像的第一类车牌相似值的过程,包括:2. method according to claim 1, is characterized in that, calculates the process of the first type license plate similarity value of any first type candidate license plate image, comprises: 对第一类候选车牌图像进行二值化处理;Perform binarization processing on the first type of candidate license plate images; 对二值化处理后得到的第一类候选车牌图像进行开运算形态学变换;performing open operation morphological transformation on the first type of candidate license plate images obtained after binarization; 通过Sobel算法对经开运算形态学变换后的第一类候选车牌图像进行垂直滤波处理,得到开运算形态学变换后的第一类候选车牌图像的第一类垂直梯度图像;Through the Sobel algorithm, the first type of candidate license plate image after the opening operation morphological transformation is subjected to vertical filtering processing, and the first type vertical gradient image of the first type of candidate license plate image after the opening operation morphological transformation is obtained; 通过Canny算法对所述第一类垂直梯度图像进行边缘检测,获得第一类边缘图像;Perform edge detection on the first type of vertical gradient image by Canny algorithm to obtain the first type of edge image; 针对所述第一类边缘图像中提取到的边缘按照垂直方向进行六等分,计算每一等分中边缘部分像素点在水平方向的跳变均值;For the edge extracted in the first type of edge image, perform sextiles according to the vertical direction, and calculate the jump mean value of the edge part pixels in the horizontal direction in each equalization; 计算所述跳变均值的平均值,将计算得到的所述平均值确定为所述第一类候选车牌图像的第一类车牌相似值。An average value of the transition average values is calculated, and the calculated average value is determined as the first type of license plate similarity value of the first type of candidate license plate images. 3.根据权利要求1所述的方法,其特征在于,所述根据预设的第一有效车牌定位规则和所计算得到的第一类车牌相似值,从所述第一类候选车牌图像中定位到至少一个有效车牌图像,包括:3. The method according to claim 1, wherein, according to the preset first valid license plate location rule and the calculated similarity value of the first type of license plate, the first type of candidate license plate image is located to at least one valid license plate image, including: 将所述第一类车牌相似值中的最大值所对应的第一类候选车牌图像确定为定位到的有效车牌图像;Determining the first type of candidate license plate image corresponding to the maximum value in the first type of license plate similarity value as the located effective license plate image; or 将所述第一类车牌相似值中,大于预设的第一定位阈值的第一类车牌相似值所对应的第一类候选车牌图像确定为定位到有效车牌图像。Among the first type of license plate similarity values, the first type of candidate license plate images corresponding to the first type of license plate similarity values greater than the preset first positioning threshold are determined as valid license plate images located. 4.根据权利要求1所述的方法,其特征在于,所述确定通过所述第一分类器和第二分类器未定位到有效车牌图像之后,所述方法还包括:4. The method according to claim 1, characterized in that, after said determining that no valid license plate image is located by said first classifier and second classifier, said method further comprises: 将所述Haar特征输入至预先建立的第三分类器中,得到与所述视频帧图像对应的第四类车牌图像信息序列,其中,所述第四类车牌图像信息序列中包含视频帧图像中搜索到的第四类候选车牌图像的位置信息,所述第三分类器为:基于提取到的针对预定的第三样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器;Input the Haar feature into the pre-established third classifier to obtain a fourth type of license plate image information sequence corresponding to the video frame image, wherein the fourth type of license plate image information sequence includes the video frame image information sequence The position information of the searched fourth type of candidate license plate image, the third classifier is: based on the Haar feature extracted for each image in the predetermined third sample image set, and adopts the adaptive promotion algorithm Adaboost algorithm The trained classifier; 基于所述第四类候选车牌图像的位置信息,确定所述视频帧图像中的第四类候选车牌图像;Based on the position information of the fourth type of candidate license plate image, determine the fourth type of candidate license plate image in the video frame image; 计算所述第四类候选车牌图像的第四类车牌相似值,并筛选出第四类车牌相似值中的最大值;Calculate the fourth type of license plate similarity value of the fourth type of candidate license plate image, and filter out the maximum value in the fourth type of license plate similarity value; 判断筛选得到的第四类车牌相似值中的最大值是否大于预设的第四相似度阈值;在判断结果为大于时,根据预设的第四有效车牌定位规则和所计算得到的第四类车牌相似值,从所述第四类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定通过所述第一分类器、第二分类器和第三分类器未定位到有效车牌图像。Judging whether the maximum value of the similarity values of the fourth type of license plate obtained by screening is greater than the preset fourth similarity threshold; license plate similarity value, locate at least one valid license plate image from the fourth type of candidate license plate images, and when the judgment result is not greater than, determine that the first classifier, the second classifier and the third classifier are not located to a valid license plate image. 5.根据权利要求4所述的方法,其特征在于,所述确定通过所述第一分类器、第二分类器和第三分类器未定位到有效车牌图像之后,所述方法还包括:5. The method according to claim 4, characterized in that, after the determination is not located to a valid license plate image by the first classifier, the second classifier and the third classifier, the method further comprises: 将所述Haar特征输入至预先建立的第四分类器中,得到与所述视频帧图像对应的第五类车牌图像信息序列,其中,所述第五类车牌图像信息序列中包含视频帧图像中搜索到的第五类候选车牌图像的位置信息,所述第四分类器为:基于提取到的针对第四样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器;Input the Haar feature into the pre-established fourth classifier to obtain the fifth type of license plate image information sequence corresponding to the video frame image, wherein the fifth type of license plate image information sequence includes the video frame image information sequence The position information of the fifth type of candidate license plate images searched, the fourth classifier is: based on the extracted Haar features for each image in the fourth sample image set, and using the adaptive promotion algorithm Adaboost algorithm training to obtain classifier; 基于所述第五类候选车牌图像的位置信息,确定所述视频帧图像中的第五类候选车牌图像;Based on the position information of the fifth type of candidate license plate image, determine the fifth type of candidate license plate image in the video frame image; 计算所述第五类候选车牌图像的第五类车牌相似值,并筛选出第五类车牌相似值中的最大值;Calculate the fifth type of license plate similarity value of the fifth type of candidate license plate image, and filter out the maximum value in the fifth type of license plate similarity value; 判断筛选得到的第五类车牌相似值中的最大值是否大于预设的第五相似度阈值;在判断结果为大于时,根据预设的第五有效车牌定位规则和所计算得到的第五类车牌相似值,从所述第五类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定未定位到有效车牌图像。Judging whether the maximum value of the similarity value of the fifth type of license plate obtained by screening is greater than the preset fifth similarity threshold; License plate similarity value, at least one valid license plate image is located from the fifth type of candidate license plate images, and when the judgment result is not greater than, it is determined that no valid license plate image has been located. 6.一种车牌定位装置,其特征在于,所述装置包括:6. A license plate location device, characterized in that said device comprises: 第一车牌序列获得模块,用于提取待定位车牌的视频帧图像的哈尔Haar特征,并将所述Haar特征输入至预先建立的第一分类器中,得到与所述视频帧图像对应的第一类车牌图像信息序列,其中,所述第一类车牌图像信息序列中包含视频帧图像中搜索到的第一类候选车牌图像的位置信息,所述第一分类器为:基于提取到的针对预定的第一样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器;The first license plate sequence obtaining module is used to extract the Haar Haar feature of the video frame image of the license plate to be located, and input the Haar feature into the pre-established first classifier to obtain the first corresponding to the video frame image. A type of license plate image information sequence, wherein the first type of license plate image information sequence includes the position information of the first type of candidate license plate image searched in the video frame image, and the first classifier is: based on the extracted Haar features of each image in the predetermined first sample image set, and a classifier obtained by using the adaptive promotion algorithm Adaboost algorithm training; 第一车牌图像确定模块,用于基于所述第一类候选车牌图像的位置信息,确定所述视频帧图像中的第一类候选车牌图像;The first license plate image determination module is configured to determine the first type of candidate license plate images in the video frame images based on the position information of the first type of candidate license plate images; 第一车牌相似度计算模块,用于计算所述第一类候选车牌图像的第一类车牌相似值,并筛选出第一类车牌相似值中的最大值;The first license plate similarity calculation module is used to calculate the first type of license plate similarity value of the first type of candidate license plate image, and filter out the maximum value in the first type of license plate similarity value; 第一车牌相似度判断模块,用于判断筛选得到的第一类车牌相似值中的最大值是否大于预设的第一相似度阈值;在判断结果为大于时,根据预设的第一有效车牌定位规则和所计算得到的第一类车牌相似值,从所述第一类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,触发第二车牌序列获得模块;The first license plate similarity judging module is used to judge whether the maximum value in the first type of license plate similarity obtained by screening is greater than the preset first similarity threshold; when the judgment result is greater than, according to the preset first valid license plate Positioning rules and the calculated similarity value of the first type of license plate, locating at least one valid license plate image from the first type of candidate license plate images, and triggering the second license plate sequence acquisition module when the judgment result is not greater than; 所述第二车牌序列获得模块,用于根据预设的图像旋转规则,对所述视频帧图像进行N次旋转,将每一次旋转后所得的视频帧图像再次输入至所述第一分类器中,获得N个第二类车牌图像信息序列;The second license plate sequence obtaining module is configured to perform N rotations on the video frame image according to a preset image rotation rule, and re-input the video frame image obtained after each rotation into the first classifier , to obtain N second-type license plate image information sequences; 第二车牌图像确定模块,用于基于所述第二类车牌图像信息序列中的第二类候选车牌图像的位置信息,确定所述视频帧图像中的第二类候选车牌图像;The second license plate image determining module is configured to determine the second type of candidate license plate image in the video frame image based on the position information of the second type of candidate license plate image in the second type of license plate image information sequence; 第二车牌相似度计算模块,用于计算每一第二类车牌图像信息序列所对应的第二类候选车牌图像的第二类车牌相似值,并筛选出每一第二类车牌图像信息序列所对应的第二类候选车牌图像的第二类车牌相似值中的最大值,进而,从筛选得到的各个第二类车牌相似值中的最大值中,确定出数值最大的目标第二类车牌相似值;The second license plate similarity calculation module is used to calculate the second type of license plate similarity value of the second type of candidate license plate image corresponding to each second type of license plate image information sequence, and screen out the second type of license plate image information sequence. The maximum value of the second-type license plate similarity value of the corresponding second-type candidate license plate image, and then, from the maximum value of each second-type license plate similarity value obtained by screening, determine the target second-type license plate similarity with the largest value value; 第二车牌相似度判断模块,用于判断所述目标第二类车牌相似值是否大于预设的第二相似度阈值,如果大于,根据预设的第二有效车牌定位规则和所计算得到的第二类车牌相似值,从所述目标第二类车牌相似值所对应的第二类车牌图像信息序列所针对的第二类候选车牌图像中定位到至少一个有效车牌图像,如果不大于,则触发第三车牌序列获得模块;The second license plate similarity judging module is used to judge whether the target second type of license plate similarity value is greater than the preset second similarity threshold, if greater, according to the preset second valid license plate location rule and the calculated first The second type of license plate similarity value, locate at least one valid license plate image from the second type of candidate license plate image targeted by the second type of license plate image information sequence corresponding to the target second type of license plate similarity value, if not greater than, trigger The module for obtaining the third license plate sequence; 所述第三车牌序列获得模块,用于继续提取所述视频帧图像的局部二值模式LBP特征,并将所述LBP特征输入至预先建立的第二分类器中,得到与所述视频帧图像对应的第三类车牌图像信息序列,其中,所述第三类车牌图像信息序列中包含视频帧图像中搜索到的第三类候选车牌图像的位置信息,所述第二分类器为:基于提取到的针对预定的第二样本图像集合中各个图像的局部二值模式LBP特征,并采用自适应提升算法Adaboost算法训练得到的分类器;The third license plate sequence obtaining module is used to continue to extract the local binary mode LBP feature of the video frame image, and input the LBP feature into the pre-established second classifier to obtain the image similar to the video frame image. The corresponding third type of license plate image information sequence, wherein the third type of license plate image information sequence includes the position information of the third type of candidate license plate image searched in the video frame image, and the second classifier is: based on extracting The obtained local binary pattern LBP feature for each image in the predetermined second sample image collection, and the classifier obtained by using the adaptive lifting algorithm Adaboost algorithm training; 第三车牌图像确定模块,用于基于所述第三类候选车牌图像的位置信息,确定所述视频帧图像中的第三类候选车牌图像;A third license plate image determining module, configured to determine a third type of candidate license plate image in the video frame image based on the position information of the third type of candidate license plate image; 第三车牌相似度计算模块,用于计算所述第三类候选车牌图像的第三类车牌相似值,并筛选出第三类车牌相似值中的最大值;The third license plate similarity calculation module is used to calculate the third type of license plate similarity value of the third type of candidate license plate images, and select the maximum value among the third type of license plate similarity values; 第三车牌相似度判断模块,用于判断筛选得到的第三类车牌相似值的最大值是否大于预设的第三相似度阈值;在判断结果为大于时,根据预设的第三有效车牌定位规则和所计算得到的第三类车牌相似值,从所述第三类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定通过所述第一分类器和第二分类器未定位到有效车牌图像。The third license plate similarity judging module is used to judge whether the maximum value of the third type of license plate similarity obtained by screening is greater than the preset third similarity threshold; The rules and the calculated similarity value of the third type of license plate are used to locate at least one valid license plate image from the third type of candidate license plate images, and when the judgment result is not greater than The classifier did not locate a valid license plate image. 7.根据权利要求6所述的装置,其特征在于,所述第一车牌相似度计算模块,用于:7. The device according to claim 6, wherein the first license plate similarity calculation module is used for: 对第一类候选车牌图像进行二值化处理;Perform binarization processing on the first type of candidate license plate images; 对二值化处理后得到的第一类候选车牌图像进行开运算形态学变换;performing open operation morphological transformation on the first type of candidate license plate images obtained after binarization; 通过Sobel算法对经开运算形态学变换后的第一类候选车牌图像进行垂直滤波处理,得到开运算形态学变换后的第一类候选车牌图像的第一类垂直梯度图像;Through the Sobel algorithm, the first type of candidate license plate image after the opening operation morphological transformation is subjected to vertical filtering processing, and the first type vertical gradient image of the first type of candidate license plate image after the opening operation morphological transformation is obtained; 通过Canny算法对所述第一类垂直梯度图像进行边缘检测,获得第一类边缘图像;Perform edge detection on the first type of vertical gradient image by Canny algorithm to obtain the first type of edge image; 针对所述第一类边缘图像中提取到的边缘按照垂直方向进行六等分,计算每一等分中边缘部分像素点在水平方向的跳变均值;For the edge extracted in the first type of edge image, perform sextiles according to the vertical direction, and calculate the jump mean value of the edge part pixels in the horizontal direction in each equalization; 计算所述跳变均值的平均值,将计算得到的所述平均值确定为所述第一类候选车牌图像的第一类车牌相似值。An average value of the transition average values is calculated, and the calculated average value is determined as the first type of license plate similarity value of the first type of candidate license plate images. 8.根据权利要求6所述的装置,其特征在于,所述第一车牌相似度判断模块包括用于根据预设的第一有效车牌定位规则和所计算得到的第一类车牌相似值从所述第一类候选车牌图像中定位到至少一个有效车牌图像的第一车牌定位子模块;8. The device according to claim 6, wherein the first license plate similarity judging module comprises a method for selecting from the first type of license plate similarity value according to the preset first valid license plate location rule and the calculated similarity value of the first type of license plate. The first license plate positioning submodule that locates at least one valid license plate image in the first type of candidate license plate images; 所述第一车牌定位子模块,具体用于:The first license plate positioning submodule is specifically used for: 将所述第一类车牌相似值中的最大值所对应的第一类候选车牌图像确定为定位到的有效车牌图像;或将所述第一类车牌相似值中,大于预设的第一定位阈值的第一类车牌相似值所对应的第一类候选车牌图像确定为定位到有效车牌图像。Determining the first type of candidate license plate image corresponding to the maximum value of the first type of license plate similarity value as the located valid license plate image; The first type of candidate license plate image corresponding to the first type of license plate similarity value of the threshold is determined to be a valid license plate image. 9.根据权利要求6所述的装置,其特征在于,所述装置还包括:9. The device according to claim 6, further comprising: 第四车牌序列获得模块,用于将所述Haar特征输入至预先建立的第三分类器中,得到与所述视频帧图像对应的第四类车牌图像信息序列,其中,所述第四类车牌图像信息序列中包含视频帧图像中搜索到的第四类候选车牌图像的位置信息,所述第三分类器为:基于提取到的针对预定的第三样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器;The fourth license plate sequence obtaining module is used to input the Haar feature into the pre-established third classifier to obtain the fourth type of license plate image information sequence corresponding to the video frame image, wherein the fourth type of license plate The image information sequence contains the position information of the fourth type of candidate license plate image searched in the video frame image, and the third classifier is: based on the extracted Haar feature for each image in the predetermined third sample image set , and use the adaptive boosting algorithm Adaboost algorithm to train the classifier; 第四车牌图像确定模块,用于基于所述第四类候选车牌图像的位置信息,确定所述视频帧图像中的第四类候选车牌图像;A fourth license plate image determination module, configured to determine a fourth type of candidate license plate image in the video frame image based on the position information of the fourth type of candidate license plate image; 第四车牌相似度计算模块,用于计算所述第四类候选车牌图像的第四类车牌相似值,并筛选出第四类车牌相似值中的最大值;The fourth license plate similarity calculation module is used to calculate the fourth type of license plate similarity value of the fourth type of candidate license plate image, and filter out the maximum value in the fourth type of license plate similarity value; 第四车牌相似度判断模块,用于判断筛选得到的第四类车牌相似值中的最大值是否大于预设的第四相似度阈值;在判断结果为大于时,根据预设的第四有效车牌定位规则和所计算得到的第四类车牌相似值,从所述第四类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定通过所述第一分类器、第二分类器和第三分类器未定位到有效车牌图像。The fourth license plate similarity judging module is used to judge whether the maximum value in the fourth type of license plate similarity obtained by screening is greater than the preset fourth similarity threshold; when the judgment result is greater than, according to the preset fourth valid license plate Positioning rules and the calculated similarity value of the fourth type of license plate, at least one valid license plate image is located from the fourth type of candidate license plate image, and when the judgment result is not greater than, it is determined that the first classifier, the second The second classifier and the third classifier did not locate valid license plate images. 10.根据权利要求9所述的装置,其特征在于,所述装置还包括:10. The device according to claim 9, further comprising: 第五车牌序列获得模块,用于将所述Haar特征输入至预先建立的第四分类器中,得到与所述视频帧图像对应的第五类车牌图像信息序列,其中,所述第五类车牌图像信息序列中包含视频帧图像中搜索到的第五类候选车牌图像的位置信息,所述第四分类器为:基于提取到的针对第四样本图像集合中各个图像的哈尔Haar特征,并采用自适应提升算法Adaboost算法训练得到的分类器;The fifth license plate sequence obtaining module is used to input the Haar feature into the pre-established fourth classifier to obtain the fifth type of license plate image information sequence corresponding to the video frame image, wherein the fifth type of license plate The image information sequence includes the position information of the fifth type of candidate license plate image searched in the video frame image, and the fourth classifier is: based on the extracted Haar feature for each image in the fourth sample image set, and The classifier trained by the adaptive promotion algorithm Adaboost algorithm; 第五车牌图像确定模块,用于基于所述第五类候选车牌图像的位置信息,确定所述视频帧图像中的第五类候选车牌图像;A fifth license plate image determination module, configured to determine the fifth type of candidate license plate image in the video frame image based on the position information of the fifth type of candidate license plate image; 第五车牌相似度计算模块,用于计算所述第五类候选车牌图像的第五类车牌相似值,并筛选出第五类车牌相似值中的最大值;The fifth license plate similarity calculation module is used to calculate the fifth type of license plate similarity value of the fifth type of candidate license plate image, and select the maximum value among the fifth type of license plate similarity values; 第五车牌相似度判断模块,用于判断筛选得到的第五类车牌相似值中的最大值是否大于预设的第五相似度阈值;在判断结果为大于时,根据预设的第五有效车牌定位规则和所计算得到的第五类车牌相似值,从所述第五类候选车牌图像中定位到至少一个有效车牌图像,在判断结果为不大于时,确定未定位到有效车牌图像。The fifth license plate similarity judging module is used to judge whether the maximum value in the fifth type of license plate similarity value obtained by screening is greater than the preset fifth similarity threshold; when the judgment result is greater than, according to the preset fifth valid license plate Based on the location rule and the calculated similarity value of the fifth type of license plate, at least one valid license plate image is located from the fifth type of candidate license plate images, and when the judgment result is not greater than that, it is determined that no valid license plate image has been located.
CN201510458607.9A 2015-07-30 2015-07-30 A kind of license plate locating method and device Active CN105117724B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510458607.9A CN105117724B (en) 2015-07-30 2015-07-30 A kind of license plate locating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510458607.9A CN105117724B (en) 2015-07-30 2015-07-30 A kind of license plate locating method and device

Publications (2)

Publication Number Publication Date
CN105117724A CN105117724A (en) 2015-12-02
CN105117724B true CN105117724B (en) 2018-04-20

Family

ID=54665707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510458607.9A Active CN105117724B (en) 2015-07-30 2015-07-30 A kind of license plate locating method and device

Country Status (1)

Country Link
CN (1) CN105117724B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106056161B (en) * 2016-06-02 2019-05-31 中国人民解放军军事医学科学院卫生装备研究所 A kind of visible detection method for Plane Rotation target
CN109034048A (en) * 2018-07-20 2018-12-18 苏州中德宏泰电子科技股份有限公司 Face recognition algorithms models switching method and apparatus
CN109447154B (en) * 2018-10-29 2021-06-04 网易(杭州)网络有限公司 Picture similarity detection method, device, medium and electronic equipment
CN111259207A (en) * 2018-11-30 2020-06-09 阿里巴巴集团控股有限公司 Short message identification method, device and equipment
CN109509355A (en) * 2019-01-07 2019-03-22 黄慧 Wisdom traffic information taken terminal
CN110992283A (en) * 2019-11-29 2020-04-10 Oppo广东移动通信有限公司 Image processing method, image processing apparatus, electronic device, and readable storage medium
CN113920596A (en) * 2021-10-17 2022-01-11 绿城科技产业服务集团有限公司 Method and system for re-matching license plate recognition data for unattended parking lots

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6553131B1 (en) * 1999-09-15 2003-04-22 Siemens Corporate Research, Inc. License plate recognition with an intelligent camera
CN101183425A (en) * 2007-12-20 2008-05-21 四川川大智胜软件股份有限公司 License plate positioning method in Guangdong and Hong Kong
CN101246551A (en) * 2008-03-07 2008-08-20 北京航空航天大学 A fast method for license plate location
CN101937508A (en) * 2010-09-30 2011-01-05 湖南大学 A license plate location and recognition method based on high-definition images

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6553131B1 (en) * 1999-09-15 2003-04-22 Siemens Corporate Research, Inc. License plate recognition with an intelligent camera
CN101183425A (en) * 2007-12-20 2008-05-21 四川川大智胜软件股份有限公司 License plate positioning method in Guangdong and Hong Kong
CN101246551A (en) * 2008-03-07 2008-08-20 北京航空航天大学 A fast method for license plate location
CN101937508A (en) * 2010-09-30 2011-01-05 湖南大学 A license plate location and recognition method based on high-definition images

Also Published As

Publication number Publication date
CN105117724A (en) 2015-12-02

Similar Documents

Publication Publication Date Title
CN105117724B (en) A kind of license plate locating method and device
US10311319B2 (en) System and method for recognizing vehicle license plate information
US10025998B1 (en) Object detection using candidate object alignment
CN101937508B (en) License plate localization and identification method based on high-definition image
Badr et al. Automatic number plate recognition system
CN103903005B (en) License plate image identification system and method
US8059868B2 (en) License plate recognition apparatus, license plate recognition method, and computer-readable storage medium
CN103324930B (en) A license plate character segmentation method based on gray histogram binarization
Kosaka et al. Vision-based nighttime vehicle detection using CenSurE and SVM
Ellahyani et al. Traffic sign detection and recognition using features combination and random forests
CN107679508A (en) Road traffic sign detection recognition methods, apparatus and system
CN101872416A (en) Method and system for license plate recognition on road images
CN107895492A (en) A kind of express highway intelligent analysis method based on conventional video
CN103226696B (en) The identification system and method for car plate
Abedin et al. Traffic sign recognition using surf: Speeded up robust feature descriptor and artificial neural network classifier
CN114387591A (en) License plate recognition method, system, device and storage medium
WO2023279966A1 (en) Multi-lane-line detection method and apparatus, and detection device
Cai et al. Real-time arrow traffic light recognition system for intelligent vehicle
CN106022268A (en) Identification method and device of speed limiting sign
KR101613703B1 (en) detection of vehicle video and license plate region extraction method
Do et al. Speed limit traffic sign detection and recognition based on support vector machines
Maheswari et al. An integrated number plate recognition system through images using threshold-based methods and KNN
He et al. Segmentation of characters on car license plates
Salahshoor et al. Application of intelligent systems for iranian license plate recognition
Chandra et al. An automated system to detect and recognize vehicle license plates of Bangladesh

Legal Events

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