WO2023097931A1 - Hough transform-based license plate tilt correction method - Google Patents

Hough transform-based license plate tilt correction method Download PDF

Info

Publication number
WO2023097931A1
WO2023097931A1 PCT/CN2022/081179 CN2022081179W WO2023097931A1 WO 2023097931 A1 WO2023097931 A1 WO 2023097931A1 CN 2022081179 W CN2022081179 W CN 2022081179W WO 2023097931 A1 WO2023097931 A1 WO 2023097931A1
Authority
WO
WIPO (PCT)
Prior art keywords
license plate
image
hough transform
tilt correction
straight line
Prior art date
Application number
PCT/CN2022/081179
Other languages
French (fr)
Chinese (zh)
Inventor
曹渊
Original Assignee
江苏航天大为科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 江苏航天大为科技股份有限公司 filed Critical 江苏航天大为科技股份有限公司
Publication of WO2023097931A1 publication Critical patent/WO2023097931A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/146Aligning or centring of the image pick-up or image-field
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/18Extraction of features or characteristics of the image
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Definitions

  • the invention belongs to the technical field of intelligent transportation, in particular to a license plate tilt correction method based on Hough transform.
  • Slanted license plate correction is a kind of image correction processing, which is to correct the slanted license plate in the image, which is more conducive to the machine's license plate recognition. License plate tilt correction is widely used in the field of intelligent transportation.
  • the key to rectifying inclined license plate technology is how to efficiently and accurately find the theoretical inclined angle.
  • the usual method is to find the optimal inclined straight line.
  • license plate recognition there may be requirements for license plate recognition at side angles, except for license plate tilt
  • stretching and distortion which has caused certain difficulties to the traditional tilt correction algorithm.
  • Most of the existing correction algorithms are aimed at rotation and tilt, and do not have the ability to restore side angle imaging, which cannot meet the actual use requirements. .
  • the present invention provides a license plate tilt correction method based on Hough transform, which includes the following steps:
  • the detection of the license plate position by the picture to be detected through the cascade classifier includes:
  • the picture to be detected is converted into a grayscale image to speed up the detection speed, and the position of the license plate is detected using the trained XML classifier file through Opencv's cascade classifier.
  • ⁇ x, ⁇ y are the translation amount
  • d x (P) are the coordinates of the input window P
  • d w (P) and d h (P) are the width and height of the input window P
  • P w and P h is the proportional coefficient
  • the loss function According to the above translation transformation and scaling, the predicted value is obtained. To minimize the gap between the predicted value and the real value, the loss function is obtained as:
  • the function optimization objective is:
  • ⁇ 5 (Pi) is the feature vector of the input window P
  • w * is the parameter to be learned
  • is the hyperparameter
  • HSV color filtering steps are as follows:
  • R, G, and B are the color components in the RGB color space
  • V, S, and H are the components in the HSV color space
  • S051 Gaussian filter According to the gray value of a certain pixel point (x, y) in the image and the pixel points in its field, the weighted average is carried out according to the parameter rules generated by the two-dimensional Gaussian formula, and the high-frequency noise superimposed in the image is removed;
  • the two-dimensional Gaussian formula is:
  • S053 performs non-maximum value suppression on the gradient image to find the local maximum value of the pixel, and eliminates the problem of thick and wide edges and weak edge interference;
  • S054 uses double thresholds for edge connection, considers points smaller than the threshold as false edges, sets 0 as points greater than the high threshold, and sets 1 as strong edges, and further checks pixels between the low threshold and the high threshold;
  • straight line detection steps are as follows:
  • is the angle between the vertical line and the x-axis, and ⁇ is the distance of the polar diameter
  • the character segmentation method includes:
  • the present invention uses a frame regression algorithm to perform quadratic regression fitting on the license plate frame, so that the obtained license plate coordinates are closer to the real license plate;
  • the present invention uses horizontal expansion operation on the binarized image to be processed to reduce the character width, reduce the number of interfering straight line segments after Hough transform and the time consumption of Hough transform.
  • the upper and lower double inclination angle correction proposed by the present invention can restore the license plate image distortion generated under side angle imaging, which is more conducive to improving the accuracy of license plate recognition.
  • Fig. 1 present invention is based on the inclined license plate correction flowchart of Hough transform
  • FIG. 2 frame regression flow chart in the present invention
  • Fig. 4 is a flow chart of straight line detection in the present invention.
  • S01 license plate location convert the image to be detected into a grayscale image to speed up the detection speed, and use the trained XML classifier file to detect the position of the license plate through the cascade classifier (CascadeClassifier) of opencv;
  • S02 Border regression In order to obtain a regression window closer to the real license plate coordinates, the present invention uses border regression to adjust the position of the license plate obtained in step 1 using a border regression algorithm.
  • the function of this algorithm is to find a mapping function so that the regression point obtained after the transformation of the original coordinate point is closer to the real coordinate point.
  • Figure 2 is a flow chart of border regression, and the specific steps are as follows:
  • ⁇ x, ⁇ y are the translation amount
  • d x (P) are the coordinates of the input window P
  • d w (P) and d h (P) are the width and height of the input window P
  • P w and P h is the proportional coefficient
  • the function optimization objective is:
  • ⁇ 5 (Pi) is the feature vector of the input window P
  • w * is the parameter to be learned
  • is the hyperparameter
  • w * can be obtained by using the gradient descent method or the least square method.
  • HSV color filtering converting the image obtained in step S02 from the RGB color space to the HSV color space.
  • HSV is a user-oriented color model that can better complete color filtering operations. The specific operation steps are as follows:
  • S031 Color space conversion convert the image from RGB color space to HSV color space according to formula 3, formula 4, formula 5, formula 6.
  • R, G, B are the color components in the RGB color space
  • V, S, H are the components in the HSV color space.
  • S032 Determine the HSV color threshold that needs to be retained according to the camera exposure parameters, remove the areas where the S component and the V component are too low, and then filter out the areas where the H component is within the threshold.
  • S05Canny edge detection Use the Canny operator to identify the binarized image once, and at the same time exclude the set with noise.
  • the implementation process is shown in Figure 3, and the specific implementation steps are as follows:
  • S051 Gaussian filter According to the gray value of a certain pixel in the image and the pixels in its field, the weighted average is carried out according to the parameter rules generated by Gaussian, and the high-frequency noise superimposed in the image is removed. Among them, the two-dimensional Gaussian formula is:
  • the Gaussian filter used is the Gaussian filter
  • the value of the filter corresponds to the weight of the pixel.
  • Equation 8 Calculating the gradient image and the angle image: use the filter obtained by using the Gaussian filter for gradient calculation as a gradient detection operator to calculate the gradient image, and the closer to the center point, the greater the weight of the pixel.
  • the angle image provides guidance for the direction of non-maximum suppression, calculated as Equation 8:
  • S053 Perform non-maximum value suppression on the gradient image: use non-maximum value suppression to find the local maximum value of the pixel, and eliminate the problem of thick and weak edges and weak edge interference.
  • S054 Use double thresholds for edge connection: Use double thresholds to eliminate false edge interference, set points less than the threshold as false edges to 0, points greater than the high threshold as strong edges set to 1, and further check between the low threshold and high Pixels in the middle of the threshold.
  • the edge is linked into a contour.
  • the algorithm will find a point that meets the low threshold in the 8 neighborhood points of the breakpoint, and then collect new edges based on this point until the entire image is closed. , complete edge detection.
  • is the angle between the vertical line and the x-axis
  • is the distance of the polar diameter
  • S062 Take a local maximum value: set a threshold according to the local maximum value, and filter the interference straight line.
  • S07 License plate rotation correction Use the rotation algorithm to rotate the original license plate image obtained in step 2 above, and stretch it according to the inclination angle of the upper and lower borders.
  • S08 license plate recognition perform character segmentation and recognition on the license plate after tilt correction.
  • the character segmentation method is: call the contour extraction function to obtain the character contour; then find the circumscribed rectangle to solve the problem of Chinese character breakage. Then call the opencv interface to load the GRU-based sequence model for character recognition.
  • the present invention uses a frame regression algorithm to perform quadratic regression fitting on the license plate frame, so that the obtained license plate coordinates are closer to the real license plate;
  • the present invention uses horizontal expansion operation on the binarized image to be processed to reduce the character width, reduce the number of interfering straight line segments after Hough transform and the time consumption of Hough transform.
  • the upper and lower double inclination angle correction proposed by the present invention can restore the license plate image distortion generated under side angle imaging, which is more conducive to improving the accuracy of license plate recognition.
  • the word "preferred” means serving as an example, instance or illustration. Any aspect or design described herein as “preferred” is not necessarily to be construed as advantageous over other aspects or designs. Rather, use of the word “preferably” is intended to present concepts in a concrete manner.
  • the term “or” is intended to mean an inclusive “or” rather than an exclusive “or”. That is, unless otherwise specified or clear from context, "X employs A or B” is meant to naturally include either of the permutations. That is, if X employs A; X employs B; or X employs both A and B, then "X employs A or B" is satisfied in any of the foregoing instances.
  • Each functional unit in the embodiment of the present invention may be integrated into one processing module, or each unit may physically exist separately, or multiple or more of the above units may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.
  • the storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like.
  • Each of the above devices or systems may execute the storage method in the corresponding method embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

The present invention relates to the field of intelligent transportation, and disclosed is a Hough transform-based license plate tilt correction method, comprising: detecting, by means of a cascade classifier, a license plate position from a picture to be detected; using a bounding box regression method to adjust the obtained license plate position; performing color filtration on a license plate image; using a horizontal expansion algorithm for the license plate image; using a Canny operator to perform single identification on the license image; using Hough transform for the license plate image to detect a discontinuity boundary to determine a rotation angle; using a rotation algorithm to rotate the license plate image, and stretching the license plate image according to upper and lower border tilt angles; and performing character segmentation and recognition on a license plate subjected to tilt correction. License plate coordinates obtained in the present invention are closer to coordinates of a real license plate; according to the present invention, a horizontal expansion operation is performed on an image so that the character width of the image is reduced, and the number of interference straight line segments after Hough transform and the time consumption of the Hough transform are reduced. According to the present invention, license plate image distortion is restored, and the accuracy of license plate recognition is improved.

Description

一种基于霍夫变换的车牌倾斜校正方法A license plate tilt correction method based on Hough transform 技术领域technical field
本发明属于智能交通技术领域,尤其涉及一种基于霍夫变换的车牌倾斜校正方法。The invention belongs to the technical field of intelligent transportation, in particular to a license plate tilt correction method based on Hough transform.
背景技术Background technique
倾斜车牌校正属于图像校正处理的一种,是为了将图像中倾斜的车牌校正后,更有利于机器进行车牌识别。车牌倾斜校正广泛应用于智能交通领域。Slanted license plate correction is a kind of image correction processing, which is to correct the slanted license plate in the image, which is more conducive to the machine's license plate recognition. License plate tilt correction is widely used in the field of intelligent transportation.
倾斜车牌校正技术的关键在于如何高效和准确地找到理论倾斜角,通常的方法是寻找最优倾斜直线,而在车牌识别的实际场景中,有可能会出现侧角度的车牌识别需求,除了车牌倾斜以外还会造成伸缩和畸变,这对传统的倾斜校正算法造成了一定的难度。现有的校正算法大都针对旋转倾斜,并不具备侧角度成像恢复的能力,不能满足实际使用需求。。The key to rectifying inclined license plate technology is how to efficiently and accurately find the theoretical inclined angle. The usual method is to find the optimal inclined straight line. However, in the actual scene of license plate recognition, there may be requirements for license plate recognition at side angles, except for license plate tilt In addition, it will cause stretching and distortion, which has caused certain difficulties to the traditional tilt correction algorithm. Most of the existing correction algorithms are aimed at rotation and tilt, and do not have the ability to restore side angle imaging, which cannot meet the actual use requirements. .
发明内容Contents of the invention
为克服现有技术对于侧角度成像造成的车牌倾斜校正效率低,最终识别准确率低的问题,本发明提供了一种基于霍夫变换的车牌倾斜校正方法,包括以下步骤:In order to overcome the problem of low license plate tilt correction efficiency and low final recognition accuracy caused by side angle imaging in the prior art, the present invention provides a license plate tilt correction method based on Hough transform, which includes the following steps:
将待检测图片通过级联分类器检测出车牌位置;Detect the position of the license plate through the cascade classifier of the picture to be detected;
使用边框回归方法将得到的车牌位置进行调整,从调整后的车牌位置获得第一车牌图像;Using the frame regression method to adjust the obtained license plate position, and obtain the first license plate image from the adjusted license plate position;
将所述第一车牌图像从RGB颜色空间转换到HSV颜色空间,进行颜色过滤,得到第二车牌图像;Convert the first license plate image from RGB color space to HSV color space, perform color filtering, and obtain the second license plate image;
将所述第二车牌图像使用水平膨胀算法去除字符信息对差分运算造成的影响,得到第三车牌图像;Using the horizontal expansion algorithm to remove the impact of the character information on the differential operation on the second license plate image to obtain a third license plate image;
使用Canny算子对所述第三车牌图像进行单次标识,且排除存在噪声的集合;Using the Canny operator to carry out a single identification on the third license plate image, and exclude the set with noise;
对所述第三车牌图像使用霍夫变换检测间断点边界,用直线拟合图片中的车牌边框以确认旋转角;Using the Hough transform to detect the boundary of the discontinuous point on the third license plate image, and fitting the license plate frame in the picture with a straight line to confirm the rotation angle;
使用旋转算法将所述第一车牌图像进行旋转,并按上下边框倾斜角进行拉伸;Using a rotation algorithm to rotate the first license plate image, and stretch it according to the inclination angle of the upper and lower borders;
对倾斜校正完成后的车牌进行字符分割和识别。Carry out character segmentation and recognition on the license plate after tilt correction.
进一步的,所述将待检测图片通过级联分类器检测出车牌位置包括:Further, the detection of the license plate position by the picture to be detected through the cascade classifier includes:
将待检测图片转化为灰度图以加快检测速度,通过Opencv的级联分类器,使用训练好的XML分类器文件检测出车牌位置。The picture to be detected is converted into a grayscale image to speed up the detection speed, and the position of the license plate is detected using the trained XML classifier file through Opencv's cascade classifier.
进一步的,所述边框回归方法步骤如下:Further, the steps of the frame regression method are as follows:
平移变换:Δx=P wd x(P),Δy=P hd y(P) Translation transformation: Δx=P w d x (P), Δy=P h d y (P)
尺度缩放:S w=exp(d w(P)),S h=exp(d h(P)) Scaling: S w = exp(d w (P)), S h = exp(d h (P))
其中Δx,Δy为平移量,d x(P),d y(P)为输入窗口P的坐标,d w(P)和d h(P)为输入窗口P的宽和高,P w和P h为比例系数; Among them, Δx, Δy are the translation amount, d x (P), d y (P) are the coordinates of the input window P, d w (P) and d h (P) are the width and height of the input window P, P w and P h is the proportional coefficient;
计算损失函数:根据上述平移变换和尺度缩放得到预测值,要使预测值与真实值的差距最小,得到损失函数为:Calculate the loss function: According to the above translation transformation and scaling, the predicted value is obtained. To minimize the gap between the predicted value and the real value, the loss function is obtained as:
Figure PCTCN2022081179-appb-000001
Figure PCTCN2022081179-appb-000001
函数优化目标为:The function optimization objective is:
Figure PCTCN2022081179-appb-000002
Figure PCTCN2022081179-appb-000002
其中φ 5(Pi)是输入窗口P的特征向量,w *是要学习的参数,
Figure PCTCN2022081179-appb-000003
代表真实框 的平移量和尺度缩放,μ为超参数;
where φ 5 (Pi) is the feature vector of the input window P, w * is the parameter to be learned,
Figure PCTCN2022081179-appb-000003
Represents the translation and scaling of the real frame, μ is the hyperparameter;
利用梯度下降法或者最小二乘法得到w *Use the gradient descent method or the least square method to obtain w * .
进一步的,所述HSV颜色过滤步骤如下:Further, the HSV color filtering steps are as follows:
将图像从RGB颜色空间转换为HSV颜色空间:Convert an image from RGB color space to HSV color space:
V=max(R,G,B)V=max(R,G,B)
Figure PCTCN2022081179-appb-000004
Figure PCTCN2022081179-appb-000004
Figure PCTCN2022081179-appb-000005
Figure PCTCN2022081179-appb-000005
If H<0 thenH=H+360If H<0 thenH=H+360
其中,R,G,B为RGB颜色空间中的色彩分量,V,S,H为HSV颜色空间中的分量;Wherein, R, G, and B are the color components in the RGB color space, and V, S, and H are the components in the HSV color space;
根据相机曝光参数确定需要保留的HSV颜色阈值,去除S分量和V分量过低的区域,再筛选出H分量在阈值内的区域。Determine the HSV color threshold that needs to be retained according to the camera exposure parameters, remove the areas where the S and V components are too low, and then filter out the areas where the H component is within the threshold.
进一步的,所述Canny边缘检测步骤如下:Further, the Canny edge detection steps are as follows:
S051高斯滤波:根据图像中某一个像素点(x,y)与其领域内的像素点的灰度值按二维高斯公式生成的参数规则进行加权平均,去除叠加在图像中的高频噪声;所述二维高斯公式为:S051 Gaussian filter: According to the gray value of a certain pixel point (x, y) in the image and the pixel points in its field, the weighted average is carried out according to the parameter rules generated by the two-dimensional Gaussian formula, and the high-frequency noise superimposed in the image is removed; The two-dimensional Gaussian formula is:
Figure PCTCN2022081179-appb-000006
Figure PCTCN2022081179-appb-000006
其中σ为常数;where σ is a constant;
S052计算梯度图像与角度图像:将使用高斯滤波器进行梯度计算得到的 滤波器作为梯度检测算子计算梯度图像,距离中心点越近的像素点权重越大,角度图像为非极大值抑制的方向提供指导,对于二元函数z=f(x,y),在点(x,y)的梯度计算公式如下:S052 Calculate the gradient image and angle image: use the filter obtained by using the Gaussian filter for gradient calculation as a gradient detection operator to calculate the gradient image, the weight of the pixel closer to the center point is greater, and the angle image is non-maximum value suppression The direction provides guidance. For the binary function z=f(x, y), the gradient calculation formula at the point (x, y) is as follows:
Figure PCTCN2022081179-appb-000007
Figure PCTCN2022081179-appb-000007
S053对梯度图像进行非极大值抑制查找像素点的局部最大值,排除边缘粗宽、弱边缘干扰的问题;S053 performs non-maximum value suppression on the gradient image to find the local maximum value of the pixel, and eliminates the problem of thick and wide edges and weak edge interference;
S054使用双阈值进行边缘连接,将小于抵阈值的点认为是假边缘置0,将大于高阈值的点认为是强边缘置1,进一步检查介于低阈值和高阈值中间的像素点;S054 uses double thresholds for edge connection, considers points smaller than the threshold as false edges, sets 0 as points greater than the high threshold, and sets 1 as strong edges, and further checks pixels between the low threshold and the high threshold;
将高阈值图像中把边缘链接成轮廓,完成边缘检测。Link the edges in the high-threshold image into contours to complete edge detection.
进一步的,所述直线检测步骤如下:Further, the straight line detection steps are as follows:
S061空间映射:将二值化图像中的每一个像素点映射到霍夫空间中的曲线,映射公式如下:S061 Space mapping: Map each pixel in the binarized image to a curve in Hough space. The mapping formula is as follows:
x cosθ+y sinθ=ρx cosθ+y sinθ=ρ
其中θ为垂直线与x轴的夹角,ρ为极径的距离;Where θ is the angle between the vertical line and the x-axis, and ρ is the distance of the polar diameter;
S062取局部极大值,设定阈值,过滤干扰直线;S062 Take a local maximum value, set a threshold, and filter the interference straight line;
S063绘制直线:在步骤S062得到的直线段上任取两点(x 1,y 1)和(x 2,y 2),求出直线线段的角度angle并转换到(-45°,45°]之间,计算如下: S063 Draw a straight line: Take any two points (x 1 , y 1 ) and (x 2 , y 2 ) on the straight line segment obtained in step S062, find the angle angle of the straight line segment and convert it to (-45°, 45°] , calculated as follows:
Figure PCTCN2022081179-appb-000008
Figure PCTCN2022081179-appb-000008
使用聚类算法计算出最优角度集合,获得车牌上下边框直线段的平均倾斜角。Use the clustering algorithm to calculate the optimal angle set, and obtain the average inclination angle of the straight line segment of the upper and lower borders of the license plate.
进一步的,所述字符分割方法包括:Further, the character segmentation method includes:
调用轮廓提取函数获取字符轮廓;Call the contour extraction function to obtain the character contour;
寻找外接矩形以解决中文字符断裂问题;Find the circumscribed rectangle to solve the problem of broken Chinese characters;
调用opencv接口加载基于GRU的序列模型进行字符识别。Call the opencv interface to load the GRU-based sequence model for character recognition.
本发明的有益效果如下:The beneficial effects of the present invention are as follows:
本发明使用边框回归算法对车牌框进行二次回归拟合,使得到的车牌坐标更接近真实车牌;The present invention uses a frame regression algorithm to perform quadratic regression fitting on the license plate frame, so that the obtained license plate coordinates are closer to the real license plate;
本发明对需处理的二值化图像使用水平膨胀操作,使其字符宽度减小,减少了霍夫变换后干扰直线段的数量和霍夫变换的耗时。The present invention uses horizontal expansion operation on the binarized image to be processed to reduce the character width, reduce the number of interfering straight line segments after Hough transform and the time consumption of Hough transform.
本发明提出的上下双倾斜角校正可以针对侧角度成像下产生的车牌图像畸变进行还原,更有利于提升车牌识别的准确率。The upper and lower double inclination angle correction proposed by the present invention can restore the license plate image distortion generated under side angle imaging, which is more conducive to improving the accuracy of license plate recognition.
附图说明Description of drawings
图1本发明基于霍夫变换的倾斜车牌校正流程图;Fig. 1 present invention is based on the inclined license plate correction flowchart of Hough transform;
图2本发明中边框回归流程图;Fig. 2 frame regression flow chart in the present invention;
图3本发明中Canny边缘检测流程图;Canny edge detection flow chart among Fig. 3 the present invention;
图4本发明中直线检测流程图。Fig. 4 is a flow chart of straight line detection in the present invention.
具体实施方式Detailed ways
下面结合附图对本发明作进一步的说明,但不以任何方式对本发明加以限制,基于本发明教导所作的任何变换或替换,均属于本发明的保护范围。The present invention will be further described below in conjunction with the accompanying drawings, but the present invention is not limited in any way. Any transformation or replacement based on the teaching of the present invention belongs to the protection scope of the present invention.
S01车牌定位:将待检测图片转化为灰度图以加快检测速度,通过opencv的级联分类器(CascadeClassifier),使用训练好的XML分类器文件检测出车牌位置;S01 license plate location: convert the image to be detected into a grayscale image to speed up the detection speed, and use the trained XML classifier file to detect the position of the license plate through the cascade classifier (CascadeClassifier) of opencv;
S02边框回归:为了获得更接近真实车牌坐标的回归窗口,本发明中使用边框回归对步骤1中得到的车牌位置使用边框回归算法进行调整。该算法的 作用是寻找一个映射函数使得原始坐标点位经过变换后得到的回归点位与真实坐标点位更加接近。图2为边框回归流程图,具体步骤如下:S02 Border regression: In order to obtain a regression window closer to the real license plate coordinates, the present invention uses border regression to adjust the position of the license plate obtained in step 1 using a border regression algorithm. The function of this algorithm is to find a mapping function so that the regression point obtained after the transformation of the original coordinate point is closer to the real coordinate point. Figure 2 is a flow chart of border regression, and the specific steps are as follows:
S021平移变换:Δx=P wd x(P),Δy=P hd y(P) S021 Translation transformation: Δx=P w d x (P), Δy=P h d y (P)
S022尺度缩放:S w=exp(d w(P)),S h=exp(d h(P)) S022 scaling: S w = exp(d w (P)), S h = exp(d h (P))
其中Δx,Δy为平移量,d x(P),d y(P)为输入窗口P的坐标,d w(P)和d h(P)为输入窗口P的宽和高,P w和P h为比例系数; Among them, Δx, Δy are the translation amount, d x (P), d y (P) are the coordinates of the input window P, d w (P) and d h (P) are the width and height of the input window P, P w and P h is the proportional coefficient;
S023计算损失函数:根据上述平移变换和尺度缩放得到预测值,要使预测值与真实值的差距最小,得到损失函数为:S023 Calculate the loss function: get the predicted value according to the above-mentioned translation transformation and scaling. To minimize the gap between the predicted value and the real value, the loss function is obtained as:
Figure PCTCN2022081179-appb-000009
Figure PCTCN2022081179-appb-000009
函数优化目标为:The function optimization objective is:
Figure PCTCN2022081179-appb-000010
Figure PCTCN2022081179-appb-000010
其中φ 5(Pi)是输入窗口P的特征向量,w *是要学习的参数,
Figure PCTCN2022081179-appb-000011
代表真实框的平移量和尺度缩放,μ为超参数;
where φ 5 (Pi) is the feature vector of the input window P, w * is the parameter to be learned,
Figure PCTCN2022081179-appb-000011
Represents the translation and scaling of the real frame, μ is the hyperparameter;
利用梯度下降法或者最小二乘法就可以得到w *w * can be obtained by using the gradient descent method or the least square method.
S03HSV颜色过滤:将步骤S02中所得图像从RGB颜色空间转换到HSV颜色空间。HSV是面向用户的颜色模型,能够更好的完成颜色过滤操作。具体操作步骤如下:S03 HSV color filtering: converting the image obtained in step S02 from the RGB color space to the HSV color space. HSV is a user-oriented color model that can better complete color filtering operations. The specific operation steps are as follows:
S031颜色空间转换:根据公式3、公式4、公式5、公式6将图像从RGB颜色空间转换为HSV颜色空间。其中,R,G,B为RGB颜色空间中的色彩分量,V,S,H为HSV颜色空间中的分量。S031 Color space conversion: convert the image from RGB color space to HSV color space according to formula 3, formula 4, formula 5, formula 6. Among them, R, G, B are the color components in the RGB color space, and V, S, H are the components in the HSV color space.
V=max(R,G,B)    (3)V=max(R,G,B) (3)
Figure PCTCN2022081179-appb-000012
Figure PCTCN2022081179-appb-000012
Figure PCTCN2022081179-appb-000013
Figure PCTCN2022081179-appb-000013
If H<0 thenH=H+360   (6)If H<0 thenH=H+360 (6)
S032:根据相机曝光参数确定需要保留的HSV颜色阈值,去除S分量和V分量过低的区域,再筛选出H分量在阈值内的区域。S032: Determine the HSV color threshold that needs to be retained according to the camera exposure parameters, remove the areas where the S component and the V component are too low, and then filter out the areas where the H component is within the threshold.
S04水平膨胀:本发明中在进行霍夫变换前使用水平膨胀算法,尽可能去除字符信息对差分运算造成的影响,同时降低霍夫变换的运算量。S04 Horizontal expansion: In the present invention, the horizontal expansion algorithm is used before the Hough transform to remove the influence of the character information on the difference operation as much as possible, and at the same time reduce the calculation amount of the Hough transform.
S05Canny边缘检测:使用Canny算子对二值化图像进行单次标识,且同时排除存在噪声的集合。实施流程如图3,具体实施步骤如下:S05Canny edge detection: Use the Canny operator to identify the binarized image once, and at the same time exclude the set with noise. The implementation process is shown in Figure 3, and the specific implementation steps are as follows:
S051高斯滤波:根据图像中某一个像素点与其领域内的像素点的灰度值按高斯公司生成的参数规则进行加权平均,去除叠加在图像中的高频噪声。其中,二维高斯公式为:S051 Gaussian filter: According to the gray value of a certain pixel in the image and the pixels in its field, the weighted average is carried out according to the parameter rules generated by Gaussian, and the high-frequency noise superimposed in the image is removed. Among them, the two-dimensional Gaussian formula is:
Figure PCTCN2022081179-appb-000014
Figure PCTCN2022081179-appb-000014
其中σ为常数。where σ is a constant.
使用的高斯滤波器为The Gaussian filter used is
Figure PCTCN2022081179-appb-000015
Figure PCTCN2022081179-appb-000015
其中滤波器的值对应像素点的权重。The value of the filter corresponds to the weight of the pixel.
S052计算梯度图像与角度图像:将使用高斯滤波器进行梯度计算得到的滤波器作为梯度检测算子计算梯度图像,距离中心点越近的像素点权重越大。角度图像为非极大值抑制的方向提供指导,计算公式如公式8:S052 Calculating the gradient image and the angle image: use the filter obtained by using the Gaussian filter for gradient calculation as a gradient detection operator to calculate the gradient image, and the closer to the center point, the greater the weight of the pixel. The angle image provides guidance for the direction of non-maximum suppression, calculated as Equation 8:
Figure PCTCN2022081179-appb-000016
Figure PCTCN2022081179-appb-000016
S053对梯度图像进行非极大值抑制:使用非极大值抑制查找像素点的局部最大值,排除边缘粗宽、弱边缘干扰的问题。S053 Perform non-maximum value suppression on the gradient image: use non-maximum value suppression to find the local maximum value of the pixel, and eliminate the problem of thick and weak edges and weak edge interference.
S054使用双阈值进行边缘连接:使用双阈值排除伪边缘干扰,将小于抵阈值的点认为是假边缘置0,将大于高阈值的点认为是强边缘置1,进一步检查介于低阈值和高阈值中间的像素点。S054 Use double thresholds for edge connection: Use double thresholds to eliminate false edge interference, set points less than the threshold as false edges to 0, points greater than the high threshold as strong edges set to 1, and further check between the low threshold and high Pixels in the middle of the threshold.
根据高阈值图像中把边缘链接成轮廓,当到达轮廓的端点时,该算法会在断点的8邻域点中寻找满足低阈值的点,再根据此点收集新的边缘,直到整个图像闭合,完成边缘检测。According to the high-threshold image, the edge is linked into a contour. When the end point of the contour is reached, the algorithm will find a point that meets the low threshold in the 8 neighborhood points of the breakpoint, and then collect new edges based on this point until the entire image is closed. , complete edge detection.
S06直线检测:对于步骤4中得到的图片使用霍夫变换检测间断点边界,用直线拟合图片中的车牌边框以确认旋转角。实施流程如图4,各个步骤的具体描述如下:S06 Line detection: Use the Hough transform to detect the boundary of the discontinuous point on the picture obtained in step 4, and use a straight line to fit the license plate frame in the picture to confirm the rotation angle. The implementation process is shown in Figure 4, and the specific description of each step is as follows:
S061空间映射:将二值化图像中的每一个像素点映射到霍夫空间中的曲线。在笛卡尔坐标平面中的一个坐标点转换到极坐标系中,对应霍夫空间中的一条曲线。映射公式如公式9S061 Space mapping: Map each pixel in the binarized image to a curve in Hough space. A coordinate point in the Cartesian coordinate plane is transformed into the polar coordinate system, corresponding to a curve in the Hough space. The mapping formula is as in formula 9
x cosθ+y sinθ=ρ   (9)x cosθ+y sinθ=ρ (9)
其中θ为垂直线与x轴的夹角,ρ为极径的距离。Where θ is the angle between the vertical line and the x-axis, and ρ is the distance of the polar diameter.
S062取局部极大值:根据局部最大值设定阈值,过滤干扰直线。S062 Take a local maximum value: set a threshold according to the local maximum value, and filter the interference straight line.
S063绘制直线:在步骤S062得到的直线段上任取两点根据公式10求出直线线段的角度angle并转换到(-45°,45°]之间。S063 Draw a straight line: randomly select two points on the straight line segment obtained in step S062 to obtain the angle angle of the straight line segment according to formula 10 and convert it to (-45°, 45°].
Figure PCTCN2022081179-appb-000017
Figure PCTCN2022081179-appb-000017
使用聚类算法计算出最优角度集合,获得车牌上下边框直线段的平均倾斜角。Use the clustering algorithm to calculate the optimal angle set, and obtain the average inclination angle of the straight line segment of the upper and lower borders of the license plate.
S07车牌旋转校正:使用旋转算法将上述步骤2中得到的原始车牌图像进行旋转,并按上下边框倾斜角进行拉伸。S07 License plate rotation correction: Use the rotation algorithm to rotate the original license plate image obtained in step 2 above, and stretch it according to the inclination angle of the upper and lower borders.
S08车牌识别:对倾斜校正完成后的车牌进行字符分割和识别。其中字符分割方法是:调用轮廓提取函数获取字符轮廓;然后寻找外接矩形以解决中文字符断裂问题。然后调用opencv接口加载基于GRU的序列模型进行字符识别。S08 license plate recognition: perform character segmentation and recognition on the license plate after tilt correction. The character segmentation method is: call the contour extraction function to obtain the character contour; then find the circumscribed rectangle to solve the problem of Chinese character breakage. Then call the opencv interface to load the GRU-based sequence model for character recognition.
本发明的有益效果如下:The beneficial effects of the present invention are as follows:
本发明使用边框回归算法对车牌框进行二次回归拟合,使得到的车牌坐标更接近真实车牌;The present invention uses a frame regression algorithm to perform quadratic regression fitting on the license plate frame, so that the obtained license plate coordinates are closer to the real license plate;
本发明对需处理的二值化图像使用水平膨胀操作,使其字符宽度减小,减少了霍夫变换后干扰直线段的数量和霍夫变换的耗时。The present invention uses horizontal expansion operation on the binarized image to be processed to reduce the character width, reduce the number of interfering straight line segments after Hough transform and the time consumption of Hough transform.
本发明提出的上下双倾斜角校正可以针对侧角度成像下产生的车牌图像畸变进行还原,更有利于提升车牌识别的准确率。The upper and lower double inclination angle correction proposed by the present invention can restore the license plate image distortion generated under side angle imaging, which is more conducive to improving the accuracy of license plate recognition.
本文所使用的词语“优选的”意指用作实例、示例或例证。本文描述为“优选的”任意方面或设计不必被解释为比其他方面或设计更有利。相反,词语“优选的”的使用旨在以具体方式提出概念。如本申请中所使用的术语“或”旨在意指包含的“或”而非排除的“或”。即,除非另外指定或从上下文中清楚,“X使用A或B”意指自然包括排列的任意一个。即,如果X使用A;X使用B;或X使用A和B二者,则“X使用A或B”在前述任一示例中得到满足。As used herein, the word "preferred" means serving as an example, instance or illustration. Any aspect or design described herein as "preferred" is not necessarily to be construed as advantageous over other aspects or designs. Rather, use of the word "preferably" is intended to present concepts in a concrete manner. As used in this application, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless otherwise specified or clear from context, "X employs A or B" is meant to naturally include either of the permutations. That is, if X employs A; X employs B; or X employs both A and B, then "X employs A or B" is satisfied in any of the foregoing instances.
而且,尽管已经相对于一个或实现方式示出并描述了本公开,但是本领域技术人员基于对本说明书和附图的阅读和理解将会想到等价变型和修改。本公开包括所有这样的修改和变型,并且仅由所附权利要求的范围限制。特别地关于由上述组件(例如元件等)执行的各种功能,用于描述这样的组件的术语旨在对应于执行所述组件的指定功能(例如其在功能上是等价的)的任意组件(除非另外指示),即使在结构上与执行本文所示的本公开的示范性实现方式中的功能的公开结构不等同。此外,尽管本公开的特定特征已经相对于若干实现方式中的仅一个被公开,但是这种特征可以与如可以对给定或特定应用而言是期望和有利的其他实现方式的一个或其他特征组合。而且,就术语“包括”、“具有”、“含有”或其变形被用在具体实施方式或权利要求中而言,这样的术语旨在以与术语“包含”相似的方式包括。Moreover, although the disclosure has been shown and described with respect to one or an implementation, equivalent alterations and modifications will occur to others skilled in the art upon the reading and understanding of this specification and the annexed drawings. The present disclosure includes all such modifications and variations and is limited only by the scope of the appended claims. With particular regard to various functions performed by the above-mentioned components (eg, elements, etc.), terms used to describe such components are intended to correspond to any component that performs the specified function of the component (eg, it is functionally equivalent) Even if there are no structural equivalents to the disclosed structures that perform the functions in the exemplary implementations of the present disclosure shown herein (unless otherwise indicated). Furthermore, although a particular feature of the present disclosure has been disclosed with respect to only one of several implementations, such feature may be combined with one or other features of other implementations as may be desirable and advantageous for a given or particular application. combination. Moreover, to the extent the terms "comprises", "has", "comprising" or variations thereof are used in the detailed description or the claims, such terms are intended to be encompassed in a manner similar to the term "comprising".
本发明实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以多个或多个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。上述提到的存储介质可以是只读存储器,磁盘或光盘等。上述的各装置或***,可以执行相应方法实施例中的存储方法。Each functional unit in the embodiment of the present invention may be integrated into one processing module, or each unit may physically exist separately, or multiple or more of the above units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like. Each of the above devices or systems may execute the storage method in the corresponding method embodiment.
综上所述,上述实施例为本发明的一种实施方式,但本发明的实施方式并不受所述实施例的限制,其他的任何背离本发明的精神实质与原理下所做的改变、修饰、代替、组合、简化,均应为等效的置换方式,都包含在本发明的保护范围之内。In summary, the above-mentioned embodiment is an embodiment of the present invention, but the embodiment of the present invention is not limited by the embodiment, any other changes that deviate from the spirit and principle of the present invention, Modifications, substitutions, combinations, and simplifications should all be equivalent replacement methods, and are all included within the protection scope of the present invention.

Claims (7)

  1. 一种基于霍夫变换的车牌倾斜校正方法,其特征在于,包括以下步骤:A license plate tilt correction method based on Hough transform, characterized in that it comprises the following steps:
    将待检测图片通过级联分类器检测出车牌位置;Detect the position of the license plate through the cascade classifier of the picture to be detected;
    使用边框回归方法将得到的车牌位置进行调整,从调整后的车牌位置获得第一车牌图像;Using the frame regression method to adjust the obtained license plate position, and obtain the first license plate image from the adjusted license plate position;
    将所述第一车牌图像从RGB颜色空间转换到HSV颜色空间,进行颜色过滤,得到第二车牌图像;Convert the first license plate image from RGB color space to HSV color space, perform color filtering, and obtain the second license plate image;
    将所述第二车牌图像使用水平膨胀算法去除字符信息对差分运算造成的影响,得到第三车牌图像;Using the horizontal expansion algorithm to remove the impact of the character information on the differential operation on the second license plate image to obtain a third license plate image;
    使用Canny算子对所述第三车牌图像进行单次标识,且排除存在噪声的集合;Using the Canny operator to carry out a single identification on the third license plate image, and exclude the set with noise;
    对所述第三车牌图像使用霍夫变换检测间断点边界,用直线拟合图片中的车牌边框以确认旋转角;Using the Hough transform to detect the boundary of the discontinuous point on the third license plate image, and fitting the license plate frame in the picture with a straight line to confirm the rotation angle;
    使用旋转算法将所述第一车牌图像进行旋转,并按上下边框倾斜角进行拉伸;Using a rotation algorithm to rotate the first license plate image, and stretch it according to the inclination angle of the upper and lower borders;
    对倾斜校正完成后的车牌进行字符分割和识别。Carry out character segmentation and recognition on the license plate after tilt correction.
  2. 根据权利要求1所述的基于霍夫变换的车牌倾斜校正方法,其特征在于,所述将待检测图片通过级联分类器检测出车牌位置包括:The license plate inclination correction method based on Hough transform according to claim 1, wherein the detecting the position of the license plate through the cascade classifier of the picture to be detected comprises:
    将待检测图片转化为灰度图以加快检测速度,通过Opencv的级联分类器,使用训练好的XML分类器文件检测出车牌位置。The picture to be detected is converted into a grayscale image to speed up the detection, and the position of the license plate is detected using the trained XML classifier file through Opencv's cascade classifier.
  3. 根据权利要求1所述的基于霍夫变换的车牌倾斜校正方法,其特征在于,所述边框回归方法步骤如下:The license plate tilt correction method based on Hough transform according to claim 1, wherein the frame regression method steps are as follows:
    平移变换:Δx=P wd x(P),Δy=P hd y(P) Translation transformation: Δx=P w d x (P), Δy=P h d y (P)
    尺度缩放:S w=exp(d w(P)),S h=exp(d h(P)) Scaling: S w = exp(d w (P)), S h = exp(d h (P))
    其中Δx,Δy为平移量,d x(P),d y(P)为输入窗口P的坐标,d w(P)和d h(P)为输入窗口P的宽和高,P w和P h为比例系数; Among them, Δx, Δy are the translation amount, d x (P), d y (P) are the coordinates of the input window P, d w (P) and d h (P) are the width and height of the input window P, P w and P h is the proportional coefficient;
    计算损失函数:根据上述平移变换和尺度缩放得到预测值,要使预测值与真实值的差距最小,得到损失函数为:Calculate the loss function: According to the above translation transformation and scaling, the predicted value is obtained. To minimize the gap between the predicted value and the real value, the loss function is obtained as:
    Figure PCTCN2022081179-appb-100001
    Figure PCTCN2022081179-appb-100001
    函数优化目标为:The function optimization objective is:
    Figure PCTCN2022081179-appb-100002
    Figure PCTCN2022081179-appb-100002
    其中φ 5(Pi)是输入窗口P的特征向量,w *是要学习的参数,
    Figure PCTCN2022081179-appb-100003
    代表真实框的平移量和尺度缩放,μ为超参数;
    where φ 5 (Pi) is the feature vector of the input window P, w * is the parameter to be learned,
    Figure PCTCN2022081179-appb-100003
    Represents the translation and scaling of the real frame, μ is the hyperparameter;
    利用梯度下降法或者最小二乘法得到w *Use the gradient descent method or the least square method to obtain w * .
  4. 根据权利要求1所述的基于霍夫变换的车牌倾斜校正方法,其特征在于,所述HSV颜色过滤步骤如下:The license plate tilt correction method based on Hough transform according to claim 1, wherein the HSV color filtering step is as follows:
    将图像从RGB颜色空间转换为HSV颜色空间:Convert an image from RGB color space to HSV color space:
    V=max(R,G,B)V=max(R,G,B)
    Figure PCTCN2022081179-appb-100004
    Figure PCTCN2022081179-appb-100004
    Figure PCTCN2022081179-appb-100005
    Figure PCTCN2022081179-appb-100005
    IfH<0 thenH=H+360IfH<0 thenH=H+360
    其中,R,G,B为RGB颜色空间中的色彩分量,V,S,H为HSV颜色空间中的分量;Wherein, R, G, and B are the color components in the RGB color space, and V, S, and H are the components in the HSV color space;
    根据相机曝光参数确定需要保留的HSV颜色阈值,去除S分量和V分量过低的区域,再筛选出H分量在阈值内的区域。Determine the HSV color threshold that needs to be retained according to the camera exposure parameters, remove the areas where the S and V components are too low, and then filter out the areas where the H component is within the threshold.
  5. 根据权利要求1所述的基于霍夫变换的车牌倾斜校正方法,其特征在于, 所述Canny边缘检测步骤如下:The license plate tilt correction method based on Hough transform according to claim 1, wherein the Canny edge detection step is as follows:
    S051高斯滤波:根据图像中某一个像素点(x,y)与其领域内的像素点的灰度值按二维高斯公式生成的参数规则进行加权平均,去除叠加在图像中的高频噪声;所述二维高斯公式为:S051 Gaussian filter: According to the gray value of a certain pixel point (x, y) in the image and the pixel points in its field, the weighted average is carried out according to the parameter rules generated by the two-dimensional Gaussian formula, and the high-frequency noise superimposed in the image is removed; The two-dimensional Gaussian formula is:
    Figure PCTCN2022081179-appb-100006
    Figure PCTCN2022081179-appb-100006
    其中σ为常数;where σ is a constant;
    S052计算梯度图像与角度图像:将使用高斯滤波器进行梯度计算得到的滤波器作为梯度检测算子计算梯度图像,距离中心点越近的像素点权重越大,角度图像为非极大值抑制的方向提供指导,对于二元函数z=f(x,y),在点(x,y)的梯度计算公式如下:S052 Calculate the gradient image and angle image: use the filter obtained by using the Gaussian filter for gradient calculation as a gradient detection operator to calculate the gradient image, the weight of the pixel closer to the center point is greater, and the angle image is non-maximum value suppression The direction provides guidance. For the binary function z=f(x, y), the gradient calculation formula at the point (x, y) is as follows:
    Figure PCTCN2022081179-appb-100007
    Figure PCTCN2022081179-appb-100007
    S053对梯度图像进行非极大值抑制查找像素点的局部最大值,排除边缘粗宽、弱边缘干扰的问题;S053 performs non-maximum value suppression on the gradient image to find the local maximum value of the pixel, and eliminates the problem of thick and wide edges and weak edge interference;
    S054使用双阈值进行边缘连接,将小于抵阈值的点认为是假边缘置0,将大于高阈值的点认为是强边缘置1,进一步检查介于低阈值和高阈值中间的像素点;S054 uses double thresholds for edge connection, considers points smaller than the threshold as false edges, sets 0 as points greater than the high threshold, and sets 1 as strong edges, and further checks pixels between the low threshold and the high threshold;
    将高阈值图像中把边缘链接成轮廓,完成边缘检测。Link the edges in the high-threshold image into contours to complete edge detection.
  6. 根据权利要求1所述的基于霍夫变换的车牌倾斜校正方法,其特征在于,所述直线检测步骤如下:The license plate tilt correction method based on Hough transform according to claim 1, wherein the straight line detection step is as follows:
    S061空间映射:将二值化图像中的每一个像素点映射到霍夫空间中的曲线,映射公式如下:S061 Space mapping: Map each pixel in the binarized image to a curve in Hough space. The mapping formula is as follows:
    x cosθ+y sinθ=ρx cosθ+y sinθ=ρ
    其中θ为垂直线与x轴的夹角,ρ为极径的距离;Where θ is the angle between the vertical line and the x-axis, and ρ is the distance of the polar diameter;
    S062取局部极大值,设定阈值,过滤干扰直线;S062 Take a local maximum value, set a threshold, and filter the interference straight line;
    S063绘制直线:在步骤S062得到的直线段上任取两点(x 1,y 1)和(x 2,y 2),求出直线线段的角度angle并转换到(-45°,45°]之间,计算如下: S063 Draw a straight line: Take any two points (x 1 , y 1 ) and (x 2 , y 2 ) on the straight line segment obtained in step S062, find the angle angle of the straight line segment and convert it to (-45°, 45°] , calculated as follows:
    Figure PCTCN2022081179-appb-100008
    Figure PCTCN2022081179-appb-100008
    使用聚类算法计算出最优角度集合,获得车牌上下边框直线段的平均倾斜角。Use the clustering algorithm to calculate the optimal angle set, and obtain the average inclination angle of the straight line segment of the upper and lower borders of the license plate.
  7. 根据权利要求1所述的基于霍夫变换的车牌倾斜校正方法,其特征在于,所述字符分割方法包括:The license plate tilt correction method based on Hough transform according to claim 1, wherein the character segmentation method comprises:
    调用轮廓提取函数获取字符轮廓;Call the contour extraction function to obtain the character contour;
    寻找外接矩形以解决中文字符断裂问题;Find the circumscribed rectangle to solve the problem of broken Chinese characters;
    调用opencv接口加载基于GRU的序列模型进行字符识别。Call the opencv interface to load the GRU-based sequence model for character recognition.
PCT/CN2022/081179 2021-12-03 2022-03-16 Hough transform-based license plate tilt correction method WO2023097931A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111469904.5 2021-12-03
CN202111469904.5A CN114299275B (en) 2021-12-03 2021-12-03 License plate inclination correction method based on Hough transformation

Publications (1)

Publication Number Publication Date
WO2023097931A1 true WO2023097931A1 (en) 2023-06-08

Family

ID=80965515

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/081179 WO2023097931A1 (en) 2021-12-03 2022-03-16 Hough transform-based license plate tilt correction method

Country Status (2)

Country Link
CN (1) CN114299275B (en)
WO (1) WO2023097931A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116468640A (en) * 2023-06-20 2023-07-21 山东正禾大教育科技有限公司 Video image enhancement method for Internet teaching
CN117078661A (en) * 2023-10-12 2023-11-17 济宁久邦工程机械设备有限公司 Intelligent detection method for production quality of structural member of overhead working truck
CN117079284A (en) * 2023-07-26 2023-11-17 苏州城市学院 Character and image oriented inclination detection and correction method and system
CN117522863A (en) * 2023-12-29 2024-02-06 临沂天耀箱包有限公司 Integrated box body quality detection method based on image features
CN117649559A (en) * 2023-12-12 2024-03-05 兰州交通大学 Intelligent parking lot parking space detection system based on deep learning
CN117689677A (en) * 2024-02-01 2024-03-12 山东大学日照研究院 Grinding wheel abrasion state identification method, system, equipment and medium
CN117994347A (en) * 2024-04-07 2024-05-07 宝鸡市鹏盛鑫有色金属有限责任公司 High-precision positioning method for flange machining drilling
CN118097581A (en) * 2024-04-28 2024-05-28 山东领军智能交通科技有限公司 Road edge recognition control method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284757A (en) * 2018-08-31 2019-01-29 湖南星汉数智科技有限公司 A kind of licence plate recognition method, device, computer installation and computer readable storage medium
CN109886896A (en) * 2019-02-28 2019-06-14 闽江学院 A kind of blue License Plate Segmentation and antidote
CN112598066A (en) * 2020-12-25 2021-04-02 中用科技有限公司 Lightweight road pavement detection method and system based on machine vision
CN112766273A (en) * 2021-01-20 2021-05-07 湘潭大学 License plate recognition method
CN112862769A (en) * 2021-01-28 2021-05-28 中南大学 Blast furnace slag iron ratio online intelligent monitoring method and system

Family Cites Families (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
US10706330B2 (en) * 2015-10-01 2020-07-07 Intellivision Technologies Corp Methods and systems for accurately recognizing vehicle license plates
CN109145915B (en) * 2018-07-27 2021-08-06 武汉科技大学 Rapid distortion correction method for license plate under complex scene
CN110619335A (en) * 2019-09-20 2019-12-27 河南工业大学 License plate positioning and character segmentation method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284757A (en) * 2018-08-31 2019-01-29 湖南星汉数智科技有限公司 A kind of licence plate recognition method, device, computer installation and computer readable storage medium
CN109886896A (en) * 2019-02-28 2019-06-14 闽江学院 A kind of blue License Plate Segmentation and antidote
CN112598066A (en) * 2020-12-25 2021-04-02 中用科技有限公司 Lightweight road pavement detection method and system based on machine vision
CN112766273A (en) * 2021-01-20 2021-05-07 湘潭大学 License plate recognition method
CN112862769A (en) * 2021-01-28 2021-05-28 中南大学 Blast furnace slag iron ratio online intelligent monitoring method and system

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116468640A (en) * 2023-06-20 2023-07-21 山东正禾大教育科技有限公司 Video image enhancement method for Internet teaching
CN116468640B (en) * 2023-06-20 2023-08-29 山东正禾大教育科技有限公司 Video image enhancement method for Internet teaching
CN117079284A (en) * 2023-07-26 2023-11-17 苏州城市学院 Character and image oriented inclination detection and correction method and system
CN117079284B (en) * 2023-07-26 2024-03-05 苏州城市学院 Character and image oriented inclination detection and correction method and system
CN117078661A (en) * 2023-10-12 2023-11-17 济宁久邦工程机械设备有限公司 Intelligent detection method for production quality of structural member of overhead working truck
CN117078661B (en) * 2023-10-12 2024-01-05 济宁久邦工程机械设备有限公司 Intelligent detection method for production quality of structural member of overhead working truck
CN117649559A (en) * 2023-12-12 2024-03-05 兰州交通大学 Intelligent parking lot parking space detection system based on deep learning
CN117522863A (en) * 2023-12-29 2024-02-06 临沂天耀箱包有限公司 Integrated box body quality detection method based on image features
CN117522863B (en) * 2023-12-29 2024-03-29 临沂天耀箱包有限公司 Integrated box body quality detection method based on image features
CN117689677A (en) * 2024-02-01 2024-03-12 山东大学日照研究院 Grinding wheel abrasion state identification method, system, equipment and medium
CN117689677B (en) * 2024-02-01 2024-04-16 山东大学日照研究院 Grinding wheel abrasion state identification method, system, equipment and medium
CN117994347A (en) * 2024-04-07 2024-05-07 宝鸡市鹏盛鑫有色金属有限责任公司 High-precision positioning method for flange machining drilling
CN117994347B (en) * 2024-04-07 2024-06-11 宝鸡市鹏盛鑫有色金属有限责任公司 High-precision positioning method for flange machining drilling
CN118097581A (en) * 2024-04-28 2024-05-28 山东领军智能交通科技有限公司 Road edge recognition control method and device

Also Published As

Publication number Publication date
CN114299275B (en) 2023-07-18
CN114299275A (en) 2022-04-08

Similar Documents

Publication Publication Date Title
WO2023097931A1 (en) Hough transform-based license plate tilt correction method
CN109086714B (en) Form recognition method, recognition system and computer device
CN109784344B (en) Image non-target filtering method for ground plane identification recognition
US11620735B2 (en) Method for restoring video data of pipe based on computer vision
WO2018219054A1 (en) Method, device, and system for license plate recognition
CN107045634B (en) Text positioning method based on maximum stable extremum region and stroke width
JP2008257713A (en) Correcting device and method for perspective transformed document image
WO2018076392A1 (en) Pedestrian statistical method and apparatus based on recognition of parietal region of human body
CN109409356B (en) Multi-direction Chinese print font character detection method based on SWT
CN105488501A (en) Method for correcting license plate slant based on rotating projection
Yoo et al. Image matching using peak signal-to-noise ratio-based occlusion detection
CN109886175B (en) Method for detecting lane line by combining straight line and circular arc
CN110414308B (en) Target identification method for dynamic foreign matters on power transmission line
CN110674812B (en) Civil license plate positioning and character segmentation method facing complex background
CN108171674B (en) Vision correction method for projector image with any visual angle
CN106934353B (en) Face recognition and active tracking method for endowment robot
CN109886935A (en) A kind of road face foreign matter detecting method based on deep learning
CN110689003A (en) Low-illumination imaging license plate recognition method and system, computer equipment and storage medium
CN111652033A (en) Lane line detection method based on OpenCV
CN106778766B (en) Positioning point-based rotating number identification method and system
CN116052152A (en) License plate recognition system based on contour detection and deep neural network
Wang et al. Lane detection algorithm based on density clustering and RANSAC
CN113053164A (en) Parking space identification method using look-around image
CN104408430B (en) License plate positioning method and device
CN115984806A (en) Road marking damage dynamic detection system

Legal Events

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

Ref document number: 22899754

Country of ref document: EP

Kind code of ref document: A1