CN109543568A - A kind of vehicle-logo location method - Google Patents

A kind of vehicle-logo location method Download PDF

Info

Publication number
CN109543568A
CN109543568A CN201811313676.0A CN201811313676A CN109543568A CN 109543568 A CN109543568 A CN 109543568A CN 201811313676 A CN201811313676 A CN 201811313676A CN 109543568 A CN109543568 A CN 109543568A
Authority
CN
China
Prior art keywords
ant
image
complexity
path
pheromone
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811313676.0A
Other languages
Chinese (zh)
Inventor
郏东耀
周佳琳
李梦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jiaotong University
Original Assignee
Beijing Jiaotong University
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 Jiaotong University filed Critical Beijing Jiaotong University
Priority to CN201811313676.0A priority Critical patent/CN109543568A/en
Publication of CN109543568A publication Critical patent/CN109543568A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
    • G06V20/584Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads of vehicle lights or traffic lights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
    • G06V10/446Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering using Haar-like filters, e.g. using integral image techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20056Discrete and fast Fourier transform, [DFT, FFT]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

本申请属于图像处理技术领域,特别是涉及一种车标定位方法。现有的车标定位方法大多使用传统方法,定位率和鲁棒性都比较差。本申请提供一种车标定位方法,所述方法包括如下步骤:步骤1):获取车辆前脸图像;步骤2):提取图像初级特征;步骤3):采用多尺度频谱残差法计算融合得到最终显著图,将显著图分割成多个子显著区域,则形成多个注意焦点;步骤4):对各区域的复杂度进行计算;步骤5):采用改进蚁群算法优化焦点转移路径;步骤6):判定车标区域。本申请车标定位算法具有更好的定位率和鲁棒性。

The present application belongs to the technical field of image processing, and in particular relates to a vehicle logo positioning method. Most of the existing vehicle logo localization methods use traditional methods, and the localization rate and robustness are relatively poor. The present application provides a method for locating a vehicle logo. The method includes the following steps: Step 1): acquiring an image of the front face of the vehicle; Step 2): extracting primary features of the image; Step 3): using a multi-scale spectral residual method to calculate and fuse to obtain In the final saliency map, the saliency map is divided into multiple sub-salient regions to form multiple focus points; Step 4): Calculate the complexity of each region; Step 5): Use the improved ant colony algorithm to optimize the focus transfer path; Step 6 ): Determine the vehicle logo area. The vehicle logo localization algorithm of the present application has better localization rate and robustness.

Description

一种车标定位方法A method of car logo positioning

技术领域technical field

本申请属于图像处理技术领域,特别是涉及一种车标定位方法。The present application belongs to the technical field of image processing, and in particular relates to a method for locating a vehicle logo.

背景技术Background technique

车标是指各种汽车品牌的标志,主要用于车辆识别,这些标志往往成为汽车企业的代表。汽车的标志包括汽车的商标或厂标,产品标牌,发动机型号及出厂编号,整车型号及出厂编号以及车辆识别代号等。按我国国家规定,新车登记和年度检验时,都要检查这些标志。汽车应当具有自己的标志,用以表明汽车的生产厂家、车型、发动机功率、承载质量、发动机及整车的出厂编号等。它们的作用是便于销售者、使用者、维修人员、交通管理部门识别车辆的“身份”。Car logo refers to the logos of various car brands, which are mainly used for vehicle identification. These logos often become the representatives of automobile enterprises. The logo of a car includes the car's trademark or factory logo, product label, engine model and factory serial number, vehicle model and factory serial number, and vehicle identification code. According to my country's national regulations, these signs must be checked during new car registration and annual inspection. The car should have its own logo to indicate the car manufacturer, model, engine power, load-bearing quality, engine and vehicle serial number, etc. Their role is to facilitate the identification of the vehicle's "identity" by sellers, users, maintenance personnel, and traffic management departments.

车标是车辆的一个重要属性,不同于车牌,车标难以更换、涂改,在盗抢车辆追查、违章车辆自动记录、停车场无人管理、桥梁路口自动收费等领域都有广泛的应用。但是,现有的车标定位方法大多使用传统方法,定位率和鲁棒性都比较差。The car logo is an important attribute of a vehicle. Different from the license plate, the car logo is difficult to replace and alter. It has a wide range of applications in the fields of robbery and robbery, automatic recording of illegal vehicles, unmanned management of parking lots, and automatic toll collection at bridges and intersections. However, most of the existing vehicle logo localization methods use traditional methods, and the localization rate and robustness are relatively poor.

发明内容SUMMARY OF THE INVENTION

1.要解决的技术问题1. Technical problems to be solved

基于车标是车辆的一个重要属性,不同于车牌,车标难以更换、涂改,在盗抢车辆追查、违章车辆自动记录、停车场无人管理、桥梁路口自动收费等领域都有广泛的应用。但是,现有的车标定位方法大多使用传统方法,定位率和鲁棒性都比较差的问题,本申请提供了一种车标定位方法。Based on the car logo is an important attribute of the vehicle, different from the license plate, the car logo is difficult to replace and alter. However, most of the existing vehicle logo positioning methods use traditional methods, and the positioning rate and robustness are relatively poor. The present application provides a vehicle logo positioning method.

2.技术方案2. Technical solutions

为了达到上述的目的,本申请提供了一种车标定位方法,所述方法包括如下步骤:In order to achieve the above purpose, the present application provides a method for locating a vehicle logo, the method comprising the following steps:

步骤1):获取车辆前脸图像;Step 1): Obtain the front face image of the vehicle;

步骤2):提取图像初级特征;Step 2): extract the primary features of the image;

步骤3):采用多尺度频谱残差法计算融合得到最终显著图,将显著图分割成多个子显著区域,则形成多个注意焦点;Step 3): adopt the multi-scale spectral residual method to calculate and fuse to obtain the final saliency map, and divide the saliency map into multiple sub-salient regions to form multiple focus points;

步骤4):对各区域的复杂度进行计算;Step 4): Calculate the complexity of each area;

步骤5):采用改进蚁群算法优化焦点转移路径;Step 5): using the improved ant colony algorithm to optimize the focus transfer path;

步骤6):判定车标区域。Step 6): Determine the vehicle logo area.

可选地,所述步骤2)中初级特征包括颜色、亮度或者方向中的一种或者几种。Optionally, the primary feature in step 2) includes one or more of color, brightness or direction.

可选地,所述颜色和亮度特征提取为将原图像经过非线性各项异性扩散方程的计算,提取出关于颜色特征和亮度特征的显著图。Optionally, the color and brightness feature extraction is to extract a saliency map about the color feature and the brightness feature by subjecting the original image to the calculation of a nonlinear anisotropic diffusion equation.

可选地,所述颜色和亮度特征提取方法如下:Optionally, the color and brightness feature extraction method is as follows:

高斯滤波函数G(x,y,σ)改进为正则化的非线性各项异性扩散方程即P-M方程:The Gaussian filter function G(x, y, σ) is improved to a regularized nonlinear anisotropic diffusion equation, that is, the P-M equation:

尺度σ分别为原始图像的1/2,1/4;对原始输入图像I(x,y)在不同尺度滤波器下逐级进行子采样和低通滤波,同时运用图像的梯度模值,将滤波与图像的边缘检测结合起来,根据图像的信息改变扩散系数且扩散系数在图像的边缘处达到极小值,根据每次迭代出来的图像的梯度的大小进行边缘判断,然后用正则化的P-M方程得到非线性扩散滤波后的图像;上式中计算的解Iσ(x,y,t)即为经过正则化滤波后的图像。The scale σ is 1/2 and 1/4 of the original image, respectively; the original input image I(x, y) is sub-sampling and low-pass filtering step by step under different scale filters, and the gradient modulus value of the image is used at the same time. The filtering is combined with the edge detection of the image, and the diffusion coefficient is changed according to the information of the image And the diffusion coefficient reaches a minimum value at the edge of the image, according to the gradient of each iteration of the image Then use the regularized PM equation to obtain the image after nonlinear diffusion filtering; the solution I σ (x, y, t) calculated in the above formula is the image after regularization and filtering.

可选地,所述方向特征提取为通过Gabor滤波器提取朝向敏感的特征,将原图像转化为朝向特征的图像;Optionally, the directional feature extraction is to extract orientation-sensitive features through a Gabor filter, and convert the original image into an image of the orientation feature;

Gabor滤波器的函数表示为:The function of the Gabor filter is expressed as:

式中x’,y′分别为:where x' and y' are respectively:

x′=xcosθ+ysinθx′=xcosθ+ysinθ

y′=-xsinθ+ycosθy′=-xsinθ+ycosθ

其中,参数θ是Gabor滤波器的朝向,f0是中心频率,σx和σy分别为在空域x′和y′方向的高斯函数方差;采用4个不同朝向(θ∈[0°,45°,90°,135°])对原始输入图像I(x,y)滤波,形成4幅朝向特征图{Rk(x,y),k=1,2,3,,4},然后归一化为一幅朝向特征显著图;其在(x0,y0)上的输出表示为:Among them, the parameter θ is the orientation of the Gabor filter, f 0 is the center frequency, σ x and σ y are the Gaussian function variances in the x′ and y′ directions of the spatial domain, respectively; four different orientations (θ∈[0°, 45 °, 90°, 135°]) filter the original input image I(x, y) to form 4 orientation feature maps {R k (x, y), k=1, 2, 3, , 4}, and then normalize It is normalized into an orientation feature saliency map; its output on (x 0 , y 0 ) is expressed as:

R(xy)=l(x,y)*h(x-x0y-)y0)R(xy)=l(x, y)*h(xx 0 y-)y 0 )

式中,x0,y0相当于感受野中心的位置,*表示卷积运算。In the formula, x 0 , y 0 are equivalent to the position of the center of the receptive field, and * represents the convolution operation.

可选地,所述多尺度频谱残差法计算融合得到最终显著图方法包括:Optionally, the method for calculating and merging the multi-scale spectral residual method to obtain the final saliency map includes:

多尺度下显著度计算过程如下:The calculation process of saliency under multi-scale is as follows:

其中,输入图像为I(x),对其傅里叶变换,得振幅谱A(f)和相位谱P(f);h是一个3*3均值滤波的卷积核,R(f)为频域残差谱;S(x)即为显著性区域图;in, The input image is I(x), and the Fourier transform of it, the amplitude spectrum A(f) and the phase spectrum P(f) are obtained; h is a convolution kernel of a 3*3 mean filter, and R(f) is the frequency domain. Residual spectrum; S(x) is the significant area map;

对不同尺度下同一特征显著图进行灰度补充调整为与原图像大小同一尺度后进行加权融合,得最终各特征显著图;由于显著图即为灰度图,对于尺度为的各特征显著图将其其余像素补充为灰度值为0;对于各尺度的颜色、亮度特征显著图计算公式为:The saliency map of the same feature at different scales is supplemented and adjusted to the same scale as the original image, and then weighted and fused to obtain the final feature saliency map; since the saliency map is a grayscale image, the scale is For each feature saliency map of , the remaining pixels are supplemented with a gray value of 0; for the color and brightness feature saliency map of each scale, the calculation formula is:

对不同的特征显著图,即颜色、亮度和方向特征显著图进行归一化合并得最终全局显著图A:The different feature saliency maps, that is, the color, brightness and direction feature saliency maps, are normalized and merged to obtain the final global saliency map A:

其中S3为由Gabor滤波融合得到的方向特征显著图,权值γ123=1,取γ1=γ2=γ3=1/3。S 3 is the saliency map of the direction feature obtained by Gabor filter fusion, the weight γ 123 =1, and γ 123 =1/3.

可选地,所述各区域的复杂度进行计算为综合分析质量对称度、图像组成复杂度和形状复杂度这三个复杂度指标,并进行线性加权融合分别得到各显著子区域A1、A2...Aj...An的区域复杂度C1、C2...Cj...CnOptionally, the complexity of each region is calculated by comprehensively analyzing the three complexity indicators of quality symmetry, image composition complexity and shape complexity, and performing linear weighted fusion to obtain the significant sub-regions A 1 and A respectively. 2 ... A j ... An of the area complexity C 1 , C 2 ... C j ... C n ;

区域复杂度代数表示为:The area complexity algebra is expressed as:

Cj=λQdj+κC′dj+μEj C j =λQ dj +κC′ dj +μE j

其中λ、κ、μ为标准化系数。Among them, λ, κ, and μ are standardized coefficients.

可选地,所述改进蚁群算法为通过对多个焦点的遍历,并根据区域复杂度和边缘信息判断此焦点的车标可信度,采用区域复杂度驱动蚂蚁优先访问复杂度较大点,加快收敛速度,同时引入蚂蚁失误率,使蚂蚁按一定概率不往信息素多的目标走,避免算法陷入局部最优解;Optionally, the improved ant colony algorithm is to traverse multiple focal points, and judge the reliability of the vehicle logo of this focal point according to the regional complexity and edge information, and use the regional complexity to drive the ants to preferentially access the points with higher complexity. , speed up the convergence speed, and introduce the ant error rate at the same time, so that the ants do not go to the target with more pheromone according to a certain probability, so as to avoid the algorithm from falling into the local optimal solution;

设有m只蚂蚁,根据以目标距离为启发因子和路径上信息素的数量为变量的概率函数选择下一目标,建立蚂蚁禁忌表tabuk,将蚂蚁访问过的焦点加入禁忌列表;设定第一只蚂蚁为失误蚂蚁,只往信息素低的目标走,故第k只蚂蚁从目标i转移到目标j的概率如下:There are m ants, select the next target according to the probability function with the target distance as the heuristic factor and the number of pheromone on the path as the variable, establish the ant tabu k table, and add the focus visited by the ants to the taboo list; set the first An ant is a mistake ant and only goes to the target with low pheromone, so the probability of the kth ant transferring from target i to target j is as follows:

其中Cj为下一目标j的区域复杂度,ω为区域复杂度的重要度系数,allowedk∈({1,2,...n}-tabuk)为允许蚂蚁选择的目标,ηij=1/d0j为路径(i,j)的启发函数,d0j为原点到目标j路径的长度,τij为路径上信息素浓度;α表示路径的重要度系数,β表示启发因子的相对平衡系数,ρ为信息素持久因子,即信息素存在强度;where C j is the regional complexity of the next target j, ω is the importance coefficient of the regional complexity, allowed k ∈({1, 2,...n}-tabu k ) is the target that ants are allowed to choose, η ij =1/d 0j is the heuristic function of the path (i, j), d 0j is the length of the path from the origin to the target j, τ ij is the pheromone concentration on the path; α represents the importance coefficient of the path, and β represents the relative heuristic factor. Equilibrium coefficient, ρ is the pheromone persistence factor, that is, the existence intensity of pheromone;

初始时刻,各条路径上的信息素数量相同,即τij(0)=C为常量,蚂蚁每完成一次搜索,更新每条路径上的信息素含量。规定区域复杂度大的目标路径上信息素增量给予额外增强,引入重要度因子即当下一转移目标复杂度大于上一目标时,信息素增量较大,反之则一定程度上抑制信息素增量,并采用蚁周模型更新全局信息,信息素增量和信息素更新方式为:At the initial moment, the number of pheromone on each path is the same, that is, τ ij (0)=C is a constant, and each time the ants complete a search, the pheromone content on each path is updated. The pheromone increment on the target path with large area complexity is given additional enhancement, and the importance factor is introduced That is, when the complexity of the next transfer target is greater than the previous target, the pheromone increment is larger, otherwise, the pheromone increment is suppressed to a certain extent, and the ant-week model is used to update the global information. The pheromone increment and pheromone update method are as follows: :

第k只蚂蚁在本次循环中经过(ij) The kth ant passes through (ij) in this cycle

其中Δτij表示在本次循环中路径ij上的信息素增量;Lk表示第k只蚂蚁环游一周的路径长度,Q为信息强度,代表蚂蚁在环游一周时释放在所经路径上的信息素总量。Among them, Δτ ij represents the pheromone increment on the path ij in this cycle; L k represents the path length of the kth ant to travel around a week, and Q is the information intensity, which means that the ants release on the path they traveled during a round trip total amount of pheromones.

可选地,所述优化焦点转移路径为将各注意焦点编号,分别为从1到n;初始化参数,将m只蚂蚁随机置于n个顶点上,τij(t)初始化为Δτij(0)=C,初始化信息素增量Δτij(t),Nc←0(Nc为迭代次数),设置迭代次数上限;设置蚂蚁k的禁忌表tabuk,将各蚂蚁的初始出发点置于当前禁忌表中;计算各蚂蚁转移到下一目标j的概率并移动蚂蚁,将此目标点j加入禁忌列表中;计算各蚂蚁的路径长度Lk(k=1,2,3...m)和在路径(i,j)上的信息素增量,按信息素更新方程修改路径(i,j)上信息素强度;对各路径(i,j),置Δτij=0,nc←nc+1;若Nc达到预定的迭代次数或无更优解出现,退出循环,否则转设置蚂蚁k的禁忌表tabuk,将各蚂蚁的初始出发点置于当前禁忌表中;输出目前最好的解,即最优路径U。Optionally, the optimized focus transfer path is to number each attention focus from 1 to n respectively; to initialize parameters, m ants are randomly placed on n vertices, and τ ij (t) is initialized as Δτ ij (0 )=C, initialize the pheromone increment Δτ ij (t), N c ←0 (N c is the number of iterations), set the upper limit of the number of iterations; set the tabu k of the ant k, and place the initial starting point of each ant in the current In the taboo list; calculate the probability of each ant moving to the next target j and move the ants, add this target point j to the taboo list; calculate the path length L k of each ant (k=1, 2, 3...m) and the pheromone increment on the path (i, j), modify the pheromone intensity on the path (i, j) according to the pheromone update equation; for each path (i, j), set Δτ ij =0, nc←nc +1; if N c reaches the predetermined number of iterations or no better solution appears, exit the loop, otherwise set the tabu k of the ant k, and put the initial starting point of each ant in the current tabu table; output the current best solution, that is, the optimal path U.

可选地,所述车标区域判定为子区域可信度定义为:Optionally, the reliability of the vehicle logo area determined as a sub-area is defined as:

其中约束条件为经蚁群优化的焦点转移路径U,按照焦点转移路径U逐个判定子区域的可信度,当某一区域的CREU=3,认定此区域为车标区域,并终止判定;其中PCi为区域复杂度,PEi为边界比率,unicityi为车辆前脸图像中车标单一性。The constraint condition is the focus transfer path U optimized by the ant colony, and the reliability of the sub-regions is determined one by one according to the focus transfer path U. When CRE U = 3 in a certain region, it is determined that this region is the vehicle logo region, and the determination is terminated; Among them, P Ci is the regional complexity, P Ei is the boundary ratio, and unicity i is the uniformity of the vehicle logo in the front face image of the vehicle.

3.有益效果3. Beneficial effects

与现有技术相比,本申请提供的一种车标定位方法的有益效果在于:Compared with the prior art, the beneficial effects of a vehicle logo positioning method provided by the present application are:

本申请提供的结合改进蚁群算法视觉注意机制车标定位方法,利用车标的质心中心对称特性,提出“质量对称度”这一新指标,并利用质量对称度、图像组成复杂度和形状复杂度三个指标衡量区域复杂度,提出改进的蚁群算法,在蚁群算法中引入区域复杂度和蚂蚁失误率,以加快算法收敛速度并缓解易陷入局部最优的影响;相较于传统车标定位算法,本申请提出的车标定位算法车标定位率最高可达98.43%;优于传统的对称性检测车标定位,也能满足实时性需求;算法的稳定性和健壮性优于另外两种算法。本申请车标定位算法具有更好的定位率和鲁棒性。The vehicle logo positioning method provided by this application combined with the improved ant colony algorithm visual attention mechanism, uses the center-of-mass symmetry characteristics of the car logo, and proposes a new index of "mass symmetry", and uses the mass symmetry, image composition complexity and shape complexity. Three indicators measure the regional complexity, and an improved ant colony algorithm is proposed. The regional complexity and ant error rate are introduced into the ant colony algorithm to speed up the algorithm convergence speed and alleviate the influence of easily falling into local optimum; The positioning algorithm, the vehicle logo positioning algorithm proposed in this application, the vehicle logo positioning rate can reach up to 98.43%; it is better than the traditional symmetry detection vehicle logo positioning, and can also meet the real-time requirements; the stability and robustness of the algorithm are better than the other two. an algorithm. The vehicle logo localization algorithm of the present application has better localization rate and robustness.

附图说明Description of drawings

图1是本申请的一种车标定位方法流程示意图。FIG. 1 is a schematic flowchart of a method for locating a vehicle logo according to the present application.

具体实施方式Detailed ways

在下文中,将参考附图对本申请的具体实施例进行详细地描述,依照这些详细的描述,所属领域技术人员能够清楚地理解本申请,并能够实施本申请。在不违背本申请原理的情况下,各个不同的实施例中的特征可以进行组合以获得新的实施方式,或者替代某些实施例中的某些特征,获得其它优选的实施方式。Hereinafter, specific embodiments of the present application will be described in detail with reference to the accompanying drawings, from which those skilled in the art can clearly understand the present application and be able to implement the present application. Without departing from the principles of the present application, the features of the various embodiments may be combined to obtain new embodiments, or instead of certain features of certain embodiments, to obtain other preferred embodiments.

itti-koch提出的基于显著性的高斯金字塔模型,它在基于非均匀采样的基础上采用中央周边差的计算方法得到显著性度量,但是计算方法只考虑了显著区域的局部特性,没有考虑整幅图像的全局信息。The saliency-based Gaussian pyramid model proposed by itti-koch, which uses the calculation method of the central peripheral difference based on non-uniform sampling to obtain the saliency measurement, but the calculation method only considers the local characteristics of the salient area, and does not consider the whole image Global information for the image.

罗四维等人提出的利用多尺度分析和编组的基于目标的计算模型使用微分算子提取边缘,源于格式塔知觉组织的轮廓编组将边缘组织成感知目标,但是模型在计算上更高效但编组的主要线索是闭合性,从而限制了该模型的应用范围。The target-based computational model using multiscale analysis and grouping proposed by Luo Siwei et al. uses differential operators to extract edges, and contour grouping derived from Gestalt perceptual organization organizes edges into perceptual targets, but the model is computationally more efficient but grouping The main clue is occlusion, which limits the scope of application of this model.

H Xiaodi基于频域信号分析提出的频谱残差显著区域检测方法采用信息论信息构成方式,从频域中滤除冗余信息得到有用信息,但是计算显著度效果明显且实时性较强,但此方法只在单一尺度下计算显著度,不能很好地描述图像的其他局部特征如颜色特征等。The spectral residual significant region detection method proposed by H Xiaodi based on frequency domain signal analysis adopts the information theory information structure method to filter redundant information from the frequency domain to obtain useful information, but the calculation saliency effect is obvious and the real-time performance is strong, but this method The saliency is only calculated at a single scale, and other local features of the image such as color features cannot be well described.

Radharkrishna等人提出由像素与整体图像的平均色的色差直接定义显著性值,具有实时性好、简单快速的优点,但是对于背景复杂的图像计算效果不理想。在注意焦点转移方面,目前使用的由粗尺度到细尺度的层次化搜索机制效率不高,实时性不强。Radharkrishna et al. proposed that the saliency value is directly defined by the color difference between the pixel and the average color of the whole image, which has the advantages of good real-time performance, simplicity and speed, but the calculation effect is not ideal for images with complex backgrounds. In terms of attention focus shift, the currently used hierarchical search mechanism from coarse scale to fine scale is not efficient and has poor real-time performance.

在机器视觉中,显著性是一种图像分区的模式,而显著图(英语:Saliency map)是显示每个像素独特性的图像。显著图的目标在于将一般图像的表示简化或是改变为更容易分析的样式。举例来说,某个像素在一张彩色图中具有较高的灰阶,其会在显著图中以较为明显的方式被显示出来。视觉刺激的观点上,如果某些特征特别能够被捕捉到注意力,这样子的特性在心理学上被称为显著性(saliency)。In machine vision, saliency is a pattern of image partitioning, and a saliency map is an image that shows the uniqueness of each pixel. The goal of a saliency map is to simplify or change the representation of a general image into a style that is easier to analyze. For example, a pixel with a higher gray level in a color map will be displayed more prominently in the saliency map. From the point of view of visual stimuli, if certain features are particularly able to capture attention, such properties are called saliency in psychology.

蚁群算法(AG)是一种模拟蚂蚁觅食行为的模拟优化算法,它是由意大利学者Dorigo M等人于1991年首先提出,并首先使用在解决TSP(旅行商问题)上。Ant Colony Algorithm (AG) is a simulation optimization algorithm that simulates the foraging behavior of ants. It was first proposed by Italian scholar Dorigo M et al. in 1991, and was first used to solve TSP (Traveling Salesman Problem).

蚁群算法的基本原理:The basic principle of ant colony algorithm:

1、蚂蚁在路径上释放信息素。1. Ants release pheromones on the path.

2、碰到还没走过的路口,就随机挑选一条路走。同时,释放与路径长度有关的信息素。2. When encountering an intersection that has not yet been passed, choose a road at random. At the same time, the pheromone related to the path length is released.

3、信息素浓度与路径长度成反比。后来的蚂蚁再次碰到该路口时,就选择信息素浓度较高路径。3. Pheromone concentration is inversely proportional to path length. When later ants encounter the intersection again, they choose the path with higher pheromone concentration.

4、最优路径上的信息素浓度越来越大。4. The pheromone concentration on the optimal path is increasing.

5、最终蚁群找到最优寻食路径。5. Finally, the ant colony finds the optimal foraging path.

蚁周模型(Ant-Cycle模型)Ant-Cycle Model (Ant-Cycle Model)

蚁量模型(Ant-Quantity模型)Ant-Quantity Model (Ant-Quantity Model)

蚁密模型(Ant-Density模型)Ant-Density Model (Ant-Density Model)

区别:the difference:

1.蚁周模型利用的是全局信息,即蚂蚁完成一个循环后更新所有路径上的信息素;1. The ant week model uses global information, that is, the ants update the pheromone on all paths after completing a cycle;

2.蚁量和蚁密模型利用的是局部信息,即蚂蚁完成一步后更新路径上的信息素。2. The ant quantity and ant density models use local information, that is, the ants update the pheromone on the path after completing one step.

所谓遍历(Traversal),是指沿着某条搜索路线,依次对树中每个结点均做一次且仅做一次访问。访问结点所做的操作依赖于具体的应用问题。遍历是二叉树上最重要的运算之一,是二叉树上进行其它运算之基础。当然遍历的概念也适合于多元素集合的情况,如数组。The so-called traversal (traversal) refers to following a certain search route, one and only one visit to each node in the tree in turn. The operations performed by the access node depend on the specific application problem. Traversal is one of the most important operations on a binary tree, and it is the basis for other operations on a binary tree. Of course, the concept of traversal is also suitable for multi-element collections, such as arrays.

Gabor是一个用于边缘提取的线性滤波器,其频率和方向表达与人类视觉系统类似,能够提供良好的方向选择和尺度选择特性,而且对于光照变化不敏感,因此十分适合纹理分析。Gabor is a linear filter for edge extraction. Its frequency and direction expression are similar to those of the human visual system. It can provide good direction selection and scale selection characteristics, and is insensitive to illumination changes, so it is very suitable for texture analysis.

参见图1,本申请提供一种车标定位方法,所述方法包括如下步骤:Referring to FIG. 1, the present application provides a method for locating a vehicle logo, and the method includes the following steps:

步骤1):获取车辆前脸图像;Step 1): Obtain the front face image of the vehicle;

步骤2):提取图像初级特征;Step 2): extract the primary features of the image;

步骤3):采用多尺度频谱残差法计算融合得到最终显著图,将显著图分割成多个子显著区域,则形成多个注意焦点;Step 3): adopt the multi-scale spectral residual method to calculate and fuse to obtain the final saliency map, and divide the saliency map into multiple sub-salient regions to form multiple focus points;

步骤4):对各区域的复杂度进行计算;Step 4): Calculate the complexity of each area;

步骤5):采用改进蚁群算法优化焦点转移路径;Step 5): using the improved ant colony algorithm to optimize the focus transfer path;

步骤6):判定车标区域。Step 6): Determine the vehicle logo area.

可选地,所述步骤2)中初级特征包括颜色、亮度或者方向中的一种或者几种。Optionally, the primary feature in step 2) includes one or more of color, brightness or direction.

可选地,所述颜色和亮度特征提取为将原图像经过非线性各项异性扩散方程的计算,提取出关于颜色特征和亮度特征的显著图。Optionally, the color and brightness feature extraction is to extract a saliency map about the color feature and the brightness feature by subjecting the original image to the calculation of a nonlinear anisotropic diffusion equation.

可选地,所述颜色和亮度特征提取方法如下:Optionally, the color and brightness feature extraction method is as follows:

高斯滤波函数G(x,y,σ)改进为正则化的非线性各项异性扩散方程即P-M方程:The Gaussian filter function G(x, y, σ) is improved to a regularized nonlinear anisotropic diffusion equation, that is, the P-M equation:

尺度σ分别为原始图像的1/2,1/4;对原始输入图像I(x,y)在不同尺度滤波器下逐级进行子采样和低通滤波,同时运用图像的梯度模值,将滤波与图像的边缘检测结合起来,根据图像的信息改变扩散系数且扩散系数在图像的边缘处达到极小值,根据每次迭代出来的图像的梯度的大小进行边缘判断,然后用正则化的P-M方程得到非线性扩散滤波后的图像;上式中计算的解Iσ(x,y,t)即为经过正则化滤波后的图像。经过改进高斯滤波,得到3个尺度σ(原始图像,原始图像的1/2,原始图像的1/4)下,颜色特征和亮度特征,共计6幅显著图。The scale σ is 1/2 and 1/4 of the original image, respectively; the original input image I(x, y) is sub-sampling and low-pass filtering step by step under different scale filters, and the gradient modulus value of the image is used at the same time. The filtering is combined with the edge detection of the image, and the diffusion coefficient is changed according to the information of the image And the diffusion coefficient reaches a minimum value at the edge of the image, according to the gradient of each iteration of the image Then use the regularized PM equation to obtain the image after nonlinear diffusion filtering; the solution I σ (x, y, t) calculated in the above formula is the image after regularization and filtering. After improved Gaussian filtering, six saliency maps in total are obtained under three scales σ (original image, 1/2 of the original image, and 1/4 of the original image).

可选地,所述方向特征提取为通过Gabor滤波器提取朝向敏感的特征,将原图像转化为朝向特征的图像;Optionally, the directional feature extraction is to extract orientation-sensitive features through a Gabor filter, and convert the original image into an image of the orientation feature;

Gabor滤波器的函数表示为:The function of the Gabor filter is expressed as:

式中x′,y′分别为:where x' and y' are respectively:

x′=x cosa+y sinθx′=x cosa+y sinθ

y′=-x sinθ+y cosθy′=-x sinθ+y cosθ

其中,参数θ是Gabor滤波器的朝向,f0是中心频率,σx和σy分别为在空域x′和y′方向的高斯函数方差;采用4个不同朝向(θ∈[0°,45°,90°,135°])对原始输入图像I(x,y)滤波,形成4幅朝向特征图{Rk(x,y),k=1,2,3,,4},然后归一化为一幅朝向特征显著图;其在(x0,y0)上的输出表示为:Among them, the parameter θ is the orientation of the Gabor filter, f 0 is the center frequency, σ x and σ y are the Gaussian function variances in the x′ and y′ directions of the spatial domain, respectively; four different orientations (θ∈[0°, 45 °, 90°, 135°]) filter the original input image I(x, y) to form 4 orientation feature maps {R k (x, y), k=1, 2, 3, , 4}, and then normalize It is normalized into an orientation feature saliency map; its output on (x 0 , y 0 ) is expressed as:

R(x,y)=I(x,y)*h(x-x0,y-y0)R(x, y)=I(x, y)*h(xx 0 , yy 0 )

式中,x0,y0相当于感受野中心的位置,*表示卷积运算。In the formula, x 0 , y 0 are equivalent to the position of the center of the receptive field, and * represents the convolution operation.

可选地,所述多尺度频谱残差法计算融合得到最终显著图方法包括:Optionally, the method for calculating and merging the multi-scale spectral residual method to obtain the final saliency map includes:

多尺度下显著度计算过程如下:The calculation process of saliency under multi-scale is as follows:

其中,输入图像为I(x),对其傅里叶变换,得振幅谱A(f)和相位谱P(f);h是一个3*3均值滤波的卷积核,R(f)为频域残差谱;S(x)即为显著性区域图;利用上述算法可得每个尺度下的颜色、亮度、方向特征共7幅显著图。in, The input image is I(x), and the Fourier transform of it, the amplitude spectrum A(f) and the phase spectrum P(f) are obtained; h is a convolution kernel of a 3*3 mean filter, and R(f) is the frequency domain. Residual spectrum; S(x) is the saliency area map; using the above algorithm, a total of 7 saliency maps of color, brightness, and direction features at each scale can be obtained.

对不同尺度下同一特征显著图进行灰度补充调整为与原图像大小同一尺度后进行加权融合,得最终各特征显著图;由于显著图即为灰度图,对于尺度为的各特征显著图将其其余像素补充为灰度值为0;对于各尺度的颜色、亮度特征显著图计算公式为:The saliency map of the same feature at different scales is supplemented and adjusted to the same scale as the original image, and then weighted and fused to obtain the final feature saliency map; since the saliency map is a grayscale image, the scale is For each feature saliency map of , the remaining pixels are supplemented with a gray value of 0; for the color and brightness feature saliency map of each scale, the calculation formula is:

对不同的特征显著图,即颜色、亮度和方向特征显著图进行归一化合并得最终全局显著图A:The different feature saliency maps, that is, the color, brightness and direction feature saliency maps, are normalized and merged to obtain the final global saliency map A:

其中S3为由Gabor滤波融合得到的方向特征显著图,权值γ123=1,取γ1=γ2=γ3=1/3。S 3 is the saliency map of the direction feature obtained by Gabor filter fusion, the weight γ 123 =1, and γ 123 =1/3.

可选地,所述各区域的复杂度进行计算为综合分析质量对称度、图像组成复杂度和形状复杂度这三个复杂度指标,并进行线性加权融合分别得到各显著子区域A1、A2…Aj…An的区域复杂度C1、C2...Cj...CnOptionally, the complexity of each region is calculated by comprehensively analyzing the three complexity indicators of quality symmetry, image composition complexity and shape complexity, and performing linear weighted fusion to obtain the significant sub-regions A 1 and A respectively. 2 ... A j ... An of the area complexity C 1 , C 2 ... C j ... C n ;

区域复杂度代数表示为:The area complexity algebra is expressed as:

Cj=λQdj+κC′dj+μEj C j =λQ dj +κC′ dj +μE j

其中λ、κ、μ为标准化系数。Among them, λ, κ, and μ are standardized coefficients.

根据多尺度全局显著图计算方法得到车辆前脸图片的显著图A(灰度图),分割后得n个子显著区域A1、A2...Aj...An。在后续焦点转移中,需要对子显著区域进行识别以判别车标区域。由人类视觉可直观得到车标区域复杂度与背景的区分度较大,故提出计算区域复杂度作为衡量车标区域的指标之一。According to the multi-scale global saliency map calculation method, the saliency map A (grayscale map) of the front face image of the vehicle is obtained, and after segmentation, n sub-saliency regions A 1 , A 2 . . . A j . . . A n are obtained. In the subsequent focus transfer, the sub-salient regions need to be identified to discriminate the vehicle logo region. It can be intuitively obtained from human vision that the distinction between the complexity of the vehicle logo area and the background is relatively large, so the computational area complexity is proposed as one of the indicators to measure the vehicle logo area.

本申请提出采用质量对称度、图像组成复杂度、形状复杂度三个指标来衡量区域复杂度。The present application proposes to use three indicators of quality symmetry, image composition complexity, and shape complexity to measure the regional complexity.

(1)质量对称度。由于车标质心在车标区域中轴线上,故计算显著子区域中轴线左右两侧的质量差,即灰度值在(0,T1)的像素个数差,设定阈值0<T1≤255、ThD≥0,定义质量对称度(quality symmetry degree) (1) Mass symmetry. Since the center of mass of the car logo is on the central axis of the car logo area, the quality difference between the left and right sides of the central axis of the significant sub-region is calculated, that is, the difference in the number of pixels whose gray value is (0, T 1 ), and the threshold is set to 0<T 1 ≤255, Th D ≥0, define the quality symmetry degree

其中为中轴线左侧的质量之和,为中轴线右侧质量之和。in is the sum of the masses on the left side of the central axis, is the sum of the masses on the right side of the central axis.

(2)图像组成复杂度。根据张学文提出的信息熵理论,可由广义集合内部状态的丰富程度来定义组成复杂度,具体方法为:N个个体组成的集合中若有k个不同的标志值x1,x2,…xi,…xk,而与之对应的个体数量分别为n1,2n,…ni,…nk,则可得该广义集合的复杂程度故在显著子区域内可由各灰度值像素出现的广义概率定义图像组成复杂度,即单位为比特(bit)。其中pi为P(xi)=ni/N,表示灰度值为i的像素出现的概率。C越大,图像组成复杂度越大。(2) Image composition complexity. According to the information entropy theory proposed by Zhang Xuewen, the composition complexity can be defined by the richness of the internal state of the generalized set. The specific method is: if there are k different flag values x 1 , x 2 ,... xi ,…x k , and the corresponding number of individuals are n 1 , 2 n ,…n i ,…n k , then the complexity of the generalized set can be obtained Therefore, in the salient sub-region, the generalized probability of the occurrence of each gray value pixel can define the image composition complexity, that is, The unit is bit. where p i is P(x i )=n i /N, which represents the probability of the occurrence of a pixel with a grayscale value of i. The larger C is, the more complex the image composition is.

(3)形状复杂度。车标形状特殊并具有一定的规则性,形状复杂度不仅包括外部轮廓信息,还包括车标内部拓扑结构。车标内部拓扑结构复杂且边界线较长,故采用边界比率(edge ratio)描述形状复杂度。边界比率nedge为边界长度,即边界像素个数,N为子区域中像素总数。Ej越大,形状复杂度越大。(3) Shape complexity. The shape of the car logo is special and has certain regularity. The shape complexity includes not only the external contour information, but also the internal topology of the car logo. The internal topological structure of the car logo is complex and the boundary line is long, so the edge ratio is used to describe the shape complexity. Boundary ratio n edge is the length of the border, that is, the number of border pixels, and N is the total number of pixels in the sub-region. The larger the Ej , the larger the shape complexity.

本申请经过多尺度显著度计算得到了全局显著图A,分割得n个显著子区域,即有n个注意焦点。通过对这n个焦点的遍历,并根据区域复杂度和边缘信息判断此焦点的车标可信度,实际可以转化为路径规划问题。本申请根据车辆前脸图片具体特点,引入区域复杂度和蚂蚁失误率引导的蚁群算法,提高其收敛速度并避免陷入局部最优解。This application obtains a global saliency map A through multi-scale saliency calculation, and divides it into n salient sub-regions, that is, there are n attention points. By traversing the n focal points and judging the reliability of the vehicle logo of this focal point according to the regional complexity and edge information, it can actually be transformed into a path planning problem. According to the specific characteristics of the vehicle front face picture, this application introduces an ant colony algorithm guided by regional complexity and ant error rate to improve its convergence speed and avoid falling into a local optimal solution.

本申请旨在快速准确的判别车标区域,判别终止条件是某一目标满足区域复杂度和边缘信息。根据常规蚁群算法,车标区域可能会在最优路径中较后访问,从而延长了整个算法的收敛时间。本申请利用车标区域复杂度较大的特点,采用区域复杂度驱动蚂蚁优先访问复杂度较大点,加快收敛速度,同时引入蚂蚁失误率,使蚂蚁按一定概率不往信息素多的目标走,避免算法陷入局部最优解。本申请的焦点转移机制遵循以下3个原则:1)禁止返回原则,即不重复访问焦点;2)复杂度优先原则,驱动蚂蚁率先访问复杂度较大的焦点;3)邻近次优先原则,在复杂度优先基础上,尽可能使规划路径较好遵循人眼焦点转移规律。The purpose of this application is to quickly and accurately discriminate the vehicle logo area, and the termination condition of the discrimination is that a certain target satisfies the area complexity and edge information. According to the conventional ant colony algorithm, the vehicle logo area may be visited later in the optimal path, thus prolonging the convergence time of the entire algorithm. This application makes use of the high complexity of the vehicle logo area, and uses the area complexity to drive ants to preferentially access the more complex points to speed up the convergence speed. At the same time, the ant error rate is introduced, so that the ants do not go to the target with more pheromone according to a certain probability. , to avoid the algorithm falling into a local optimal solution. The focus transfer mechanism of this application follows the following three principles: 1) the principle of no return, that is, the focus is not repeatedly accessed; 2) the principle of complexity priority, which drives the ants to visit the focus with greater complexity first; 3) the principle of adjacent second priority, in the On the basis of prioritizing complexity, the planned path should better follow the law of human eye focus transfer as much as possible.

可选地,所述改进蚁群算法为通过对多个焦点的遍历,并根据区域复杂度和边缘信息判断此焦点的车标可信度,采用区域复杂度驱动蚂蚁优先访问复杂度较大点,加快收敛速度,同时引入蚂蚁失误率,使蚂蚁按一定概率不往信息素多的目标走,避免算法陷入局部最优解;Optionally, the improved ant colony algorithm is to traverse multiple focal points, and judge the reliability of the vehicle logo of this focal point according to the regional complexity and edge information, and use the regional complexity to drive the ants to preferentially access the points with higher complexity. , speed up the convergence speed, and introduce the ant error rate at the same time, so that the ants do not go to the target with more pheromone according to a certain probability, so as to avoid the algorithm from falling into the local optimal solution;

设有m只蚂蚁,根据以目标距离为启发因子和路径上信息素的数量为变量的概率函数选择下一目标,蚂蚁选择策略与下一目标区域复杂度也相关,建立蚂蚁禁忌表tabuk,将蚂蚁访问过的焦点加入禁忌列表;设定第一只蚂蚁为失误蚂蚁,只往信息素低的目标走,故第k只蚂蚁从目标i转移到目标j的概率如下:There are m ants, and the next target is selected according to the probability function that takes the target distance as the heuristic factor and the number of pheromone on the path as the variable. The ant selection strategy is also related to the complexity of the next target area. The focus visited by the ant is added to the taboo list; the first ant is set as the error ant, and only goes to the target with low pheromone, so the probability of the kth ant transferring from target i to target j is as follows:

其中Cj为下一目标j的区域复杂度,ω为区域复杂度的重要度系数,allowedk∈({1,2,...n}-tabuk)为允许蚂蚁选择的目标,ηij=1/d0j为路径(i,j)的启发函数,d0j为原点到目标j路径的长度,τij为路径上信息素浓度;α表示路径的重要度系数,β表示启发因子的相对平衡系数,ρ为信息素持久因子,即信息素存在强度;where C j is the regional complexity of the next target j, ω is the importance coefficient of the regional complexity, allowed k ∈({1, 2,...n}-tabu k ) is the target that ants are allowed to choose, η ij =1/d 0j is the heuristic function of the path (i, j), d 0j is the length of the path from the origin to the target j, τ ij is the pheromone concentration on the path; α represents the importance coefficient of the path, and β represents the relative heuristic factor. Equilibrium coefficient, ρ is the pheromone persistence factor, that is, the existence intensity of pheromone;

初始时刻,各条路径上的信息素数量相同,即τij(0)=C为常量,蚂蚁每完成一次搜索,更新每条路径上的信息素含量。规定区域复杂度大的目标路径上信息素增量给予额外增强,引入重要度因子即当下一转移目标复杂度大于上一目标时,信息素增量较大,反之则一定程度上抑制信息素增量,并采用蚁周(Ant-cycle)模型更新全局信息,信息素增量和信息素更新方式为:At the initial moment, the number of pheromone on each path is the same, that is, τ ij (0)=C is a constant, and each time the ants complete a search, the pheromone content on each path is updated. The pheromone increment on the target path with large area complexity is given additional enhancement, and the importance factor is introduced That is, when the complexity of the next transfer target is greater than the previous target, the pheromone increment is larger, otherwise, the pheromone increment is suppressed to a certain extent, and the ant-cycle model is used to update the global information. The pheromone increment and The pheromone update method is:

第k只蚂蚁在本次循环中经过(ij) The kth ant passes through (ij) in this cycle

其中Δτij表示在本次循环中路径ij上的信息素增量;Lk表示第k只蚂蚁环游一周的路径长度,Q为信息强度,代表蚂蚁在环游一周时释放在所经路径上的信息素总量。Among them, Δτ ij represents the pheromone increment on the path ij in this cycle; L k represents the path length of the kth ant to travel around a week, and Q is the information intensity, which means that the ants release on the path they traveled during a round trip total amount of pheromones.

可选地,所述优化焦点转移路径为将各注意焦点编号,分别为从1到n;初始化参数,将m只蚂蚁随机置于n个顶点上,τij(t)初始化为τij(0)=C,初始化信息素增量Δτij(t),Nc←0(Nc为迭代次数),设置迭代次数上限;设置蚂蚁k的禁忌表tabuk,将各蚂蚁的初始出发点置于当前禁忌表中;计算各蚂蚁转移到下一目标j的概率并移动蚂蚁,将此目标点j加入禁忌列表中;计算各蚂蚁的路径长度Lk(k=1,2,3...m)和在路径(i,j)上的信息素增量,按信息素更新方程修改路径(i,j)上信息素强度;对各路径(i,j),置Δτij=0,nc←nc+1;若Nc达到预定的迭代次数或无更优解出现,退出循环,否则转设置蚂蚁k的禁忌表tabuk,将各蚂蚁的初始出发点置于当前禁忌表中;输出目前最好的解,即最优路径U。Optionally, the optimized focus transfer path is to number each attention focus from 1 to n; initialization parameters are to randomly place m ants on n vertices, and τ ij (t) is initialized to τ ij (0 )=C, initialize the pheromone increment Δτ ij (t), N c ←0 (N c is the number of iterations), set the upper limit of the number of iterations; set the tabu k of the ant k, and place the initial starting point of each ant in the current In the taboo list; calculate the probability of each ant moving to the next target j and move the ants, add this target point j to the taboo list; calculate the path length L k of each ant (k=1, 2, 3...m) and the pheromone increment on the path (i, j), modify the pheromone intensity on the path (i, j) according to the pheromone update equation; for each path (i, j), set Δτ ij =0, nc←nc +1; if N c reaches the predetermined number of iterations or no better solution appears, exit the loop, otherwise set the tabu k of the ant k, and put the initial starting point of each ant in the current tabu table; output the current best solution, that is, the optimal path U.

车标区域复杂度较大,但是区域复杂度较大的区域不一定是车标区域,即区域复杂度应作为判定车标区域的必要不充分条件,在此基础上,同时考虑先前提取的目标边缘信息,即边界比率较大的区域为车标区域的可能性也越大。另外由于车辆前脸图像中车标不具有重复性,即单一性(unicity),而大车灯、雾灯、转向灯等都是成对出现的,故复杂度信息唯一的区域为车标区域的可能性也最大。故定义三个条件均满足的区域为车标区域,缺一不可。The complexity of the car logo area is relatively large, but the area with high regional complexity is not necessarily the car logo area, that is, the regional complexity should be regarded as a necessary and insufficient condition for determining the car logo area. On this basis, the previously extracted targets are also considered. The edge information, that is, the area with a larger border ratio is also more likely to be a vehicle logo area. In addition, because the car logo in the front face image of the vehicle is not repetitive, that is, unicity, and the headlights, fog lights, turn signals, etc. all appear in pairs, the only area of complexity information is the car logo area. most likely. Therefore, it is necessary to define the area where the three conditions are satisfied as the vehicle logo area.

可选地,所述车标区域判定为子区域可信度定义为:Optionally, the reliability of the vehicle logo area determined as a sub-area is defined as:

其中约束条件为经蚁群优化的焦点转移路径U,按照焦点转移路径U逐个判定子区域的可信度,当某一区域的CREU=3,认定此区域为车标区域,并终止判定;其中PCi为区域复杂度,PEi为边界比率,unicityi为车辆前脸图像中车标单一性。如此,经过三个指标的层层判断,判定出的车标区域可信度大为增加。The constraint condition is the focus transfer path U optimized by the ant colony, and the reliability of the sub-regions is determined one by one according to the focus transfer path U. When CRE U = 3 in a certain region, it is determined that this region is the vehicle logo region, and the determination is terminated; Among them, P Ci is the regional complexity, P Ei is the boundary ratio, and unicity i is the uniformity of the vehicle logo in the front face image of the vehicle. In this way, through the layer-by-layer judgment of the three indicators, the reliability of the determined vehicle logo area is greatly increased.

(1)提取车辆前脸图片的初级视觉特征,采用多尺度频谱残差法计算融合得到最终显著图,综合考虑了图像的局部信息和全局信息。(1) Extract the primary visual features of the front face image of the vehicle, and use the multi-scale spectral residual method to calculate and fuse to obtain the final saliency map, which comprehensively considers the local information and global information of the image.

(2)利用车标的质心中心对称特性,提出“质量对称度”这一新指标,并利用质量对称度、图像组成复杂度和形状复杂度三个指标衡量区域复杂度。(2) Using the symmetry characteristics of the center of mass of the car logo, a new index of "mass symmetry" is proposed, and three indicators of mass symmetry, image composition complexity and shape complexity are used to measure the regional complexity.

(3)采用改进蚁群算法优化焦点转移路径,通过区域复杂度驱动蚂蚁优先访问复杂度较大点,并引入蚂蚁失误率这一调整因子,有效增加路径搜索效率,避免陷入局部最优解。(3) The improved ant colony algorithm is used to optimize the focus transfer path, and the regional complexity drives the ants to preferentially visit the points with higher complexity, and introduces the adjustment factor of the ant error rate, which effectively increases the path search efficiency and avoids falling into the local optimal solution.

本申请提供的结合改进蚁群算法视觉注意机制车标定位方法,利用车标的质心中心对称特性,提出“质量对称度”这一新指标,并利用质量对称度、图像组成复杂度和形状复杂度三个指标衡量区域复杂度,提出改进的蚁群算法,在蚁群算法中引入区域复杂度和蚂蚁失误率,以加快算法收敛速度并缓解易陷入局部最优的影响;相较于传统车标定位算法,本申请提出的车标定位算法车标定位率最高可达98.43%;优于传统的对称性检测车标定位,也能满足实时性需求;算法的稳定性和健壮性优于另外两种算法。本申请车标定位算法具有更好的定位率和鲁棒性。The vehicle logo positioning method provided by this application combined with the improved ant colony algorithm visual attention mechanism, uses the center-of-mass symmetry characteristics of the car logo, and proposes a new index of "mass symmetry", and uses the mass symmetry, image composition complexity and shape complexity. Three indicators measure the regional complexity, and an improved ant colony algorithm is proposed. The regional complexity and ant error rate are introduced into the ant colony algorithm to speed up the algorithm convergence speed and alleviate the influence of easily falling into local optimum; The positioning algorithm, the vehicle logo positioning algorithm proposed in this application, the vehicle logo positioning rate can reach up to 98.43%; it is better than the traditional symmetry detection vehicle logo positioning, and can also meet the real-time requirements; the stability and robustness of the algorithm are better than the other two. an algorithm. The vehicle logo localization algorithm of the present application has better localization rate and robustness.

尽管在上文中参考特定的实施例对本申请进行了描述,但是所属领域技术人员应当理解,在本申请公开的原理和范围内,可以针对本申请公开的配置和细节做出许多修改。本申请的保护范围由所附的权利要求来确定,并且权利要求意在涵盖权利要求中技术特征的等同物文字意义或范围所包含的全部修改。Although the present application has been described above with reference to specific embodiments, it will be understood by those skilled in the art that many modifications may be made in configuration and detail disclosed herein within the spirit and scope of the present disclosure. The scope of protection of the present application is to be determined by the appended claims, and the claims are intended to cover all modifications encompassed by the literal meaning or scope of equivalents to the technical features in the claims.

Claims (10)

1. A car logo positioning method is characterized in that: the method comprises the following steps:
step 1): acquiring a front face image of a vehicle;
step 2): extracting primary features of the image;
step 3): calculating and fusing by adopting a multi-scale spectrum residual method to obtain a final saliency map, and dividing the saliency map into a plurality of sub saliency areas to form a plurality of attention focuses;
step 4): calculating the complexity of each region;
step 5): optimizing a focus transfer path by adopting an improved ant colony algorithm;
step 6): and judging the car logo area.
2. The emblem positioning method of claim 1, characterized in that: the primary features in the step 2) comprise one or more of color, brightness or direction.
3. The emblem positioning method of claim 2, characterized in that: the color and brightness feature extraction is to extract a saliency map about color features and brightness features from an original image through calculation of a nonlinear anisotropic diffusion equation.
4. The emblem positioning method of claim 3, characterized in that: the color and brightness feature extraction method comprises the following steps:
the gaussian filter function G (x, y, σ) is modified to a regularized nonlinear anisotropic diffusion equation, P-M equation:
the scale σ is 1/2, 1/4 of the original image, respectively; the method comprises the steps of performing sub-sampling and low-pass filtering on an original input image I (x, y) step by step under different scale filters, simultaneously combining the filtering with the edge detection of the image by using the gradient module value of the image, and changing the diffusion coefficient according to the information of the imageAnd the diffusion coefficient reaches a minimum value at the edge of the image according to the gradient of the image obtained by each iterationThe size of the image is subjected to edge judgment, and then a regularized P-M equation is used for obtaining an image subjected to nonlinear diffusion filtering; solution I calculated in the above equationσ(x, y, t) is the processRegularizing the filtered image.
5. The emblem positioning method of claim 2, characterized in that: the directional feature extraction is to extract orientation-sensitive features through a Gabor filter and convert an original image into an image of the orientation features;
the function of the Gabor filter is expressed as:
wherein x ', y' are respectively:
x′=xcosθ+ysinθ
y′=-xsin9+ycosθ
where the parameter θ is the orientation of the Gabor filter, f0Is the center frequency, σxAnd σyGaussian function variances in the spatial domain x 'and y' directions, respectively; using 4 different orientations (theta e [0 deg. ], 45 deg., 90 deg., 135 deg. ]]) Filtering the original input image I (x, y) to form 4 orientation feature maps { R }k(x, y), k is 1, 2, 3, 4}, and then normalized to an orientation feature saliency map; which is in (x)0,y0) The output of (c) is represented as:
R(x,y)=I(x,y)*h(x-x0,y-y0)
in the formula, x0,y0The position corresponding to the center of the field represents the convolution operation.
6. The emblem positioning method of claim 1, characterized in that: the method for obtaining the final saliency map through calculation fusion by the multi-scale spectrum residual error method comprises the following steps:
the process of calculating the significance under multiple scales is as follows:
wherein,the input image is I (x), Fourier transform is carried out on the input image to obtain an amplitude spectrum A (f) and a phase spectrum P (f); h is a convolution kernel with 3 × 3 mean filtering, and R (f) is a frequency domain residual spectrum; s (x) is a saliency region map;
performing gray level supplement adjustment on the same characteristic saliency map under different scales to the same scale with the original image size, and performing weighted fusion to obtain final characteristic saliency maps; since the saliency map is a grayscale map, for a scale ofSupplementing the rest pixels of each feature saliency map into gray values of 0; the calculation formula of the color and brightness feature saliency map for each scale is as follows:
different feature saliency maps, namely color, brightness and direction feature saliency maps are normalized and merged to obtain a final global saliency map A:
wherein S3The weight gamma is a direction feature saliency map obtained by Gabor filtering fusion1231, take γ1=γ2=γ3=1/3。
7. The emblem positioning method of claim 1, characterized in that: the complexity of each region is calculated into three complexity indexes of comprehensive analysis quality symmetry, image composition complexity and shape complexity, and linear weighted fusion is carried out to respectively obtain each significant subregion A1、A2...Aj...AnRegion complexity C of1、C2...Cj...Cn
The region complexity algebraic representation is:
Cj=λQdj+κC′dj+μEj
wherein λ, κ, μ are normalization coefficients.
8. The emblem positioning method of claim 1, characterized in that: the improved ant colony algorithm is characterized in that through traversal of a plurality of focuses, the reliability of the car logo of the focus is judged according to the regional complexity and the edge information, the regional complexity is adopted to drive ants to preferentially access points with higher complexity, the convergence speed is accelerated, meanwhile, the ant error rate is introduced, the ants do not walk to targets with more pheromones according to a certain probability, and the algorithm is prevented from falling into a local optimal solution;
m ants are arranged, the next target is selected according to a probability function taking the target distance as a heuristic factor and the quantity of pheromones on the path as a variable, and an ant taboo table tabu is establishedkAdding the focus visited by the ants into a taboo list; the first ant is set as a miss ant and only goes to the target with low pheromone, so the probability that the kth ant transfers from the target i to the target j is as follows:
wherein C isjFor the region complexity of the next target j, ω is the importance coefficient of the region complexity, allowedk∈({1,2,...n}-tabuk) Goal to allow ants to choose, ηij=1/d0jAs a heuristic function of the path (i, j), d0jLength of path from origin to target j, τijα represents the importance coefficient of the path, β represents the relative balance coefficient of the heuristic factor, and rho is the pheromone persistence factor, namely the pheromone existence intensity;
at the initial time, the number of information elements on each path is the same, i.e. τij(0) And C is a constant, and the pheromone content on each path is updated by the ants each time the ants complete the search. The pheromone increment on a target path with large complexity in a specified area is additionally enhanced, and an importance factor is introducedWhen the complexity of the next transfer target is larger than that of the previous target, the pheromone increment is larger, otherwise, the pheromone increment is inhibited to a certain extent, the global information is updated by adopting the ant surrounding model, and the pheromone increment and pheromone updating mode is as follows:
the kth ant passes through the cycle (ij)
Where Δ τ isijIndicating pheromone increment on the path ij in the current cycle; l iskThe path length of the kth ant in the circumcircle is shown, and Q is the information intensity and represents the total amount of pheromone released on the path by the ant in the circumcircle.
9. The emblem positioning method of claim 8, characterized in that: the optimized focus transfer path is formed by numbering attention focuses from 1 to n; initializing parameters, randomly placing m ants on n vertexes, tauij(t) initialization to τij(0) C, initialization pheromone increment Δ τij(t),Nc←0(NcIteration times), setting an upper limit of the iteration times; tabu with ant kkPlacing the initial starting point of each ant in a current taboo list; calculating the probability of transferring each ant to the next target j, moving the ants, and adding the target point j into a taboo list; calculating the path length L of each antk(k 1, 2, 3.. m) and pheromone increments on path (i, j), modifying pheromone intensities on path (i, j) according to a pheromone update equation; for each path (i, j), a [ Delta ] tau is setijNo. 0, nc ← nc + 1; if N is presentcWhen the preset iteration times are reached or no more optimal solution appears, the loop is exited, otherwise, the taboo table tabu of the ant k is setkPlacing the initial starting point of each ant in a current taboo list; and outputting the best solution at present, namely the optimal path U.
10. The emblem positioning method of claim 1, characterized in that: the credibility of the car logo area judged as the sub-area is defined as:
wherein the constraint condition is the focus transfer path U optimized by the ant colony, the credibility of the sub-regions is judged one by one according to the focus transfer path U, and when the CRE of a certain regionUDetermining the area as a car logo area and terminating the judgment; wherein P isCiFor regional complexity, PEiAs boundary ratio, unityiThe vehicle logo in the front face image of the vehicle is unity.
CN201811313676.0A 2018-11-06 2018-11-06 A kind of vehicle-logo location method Pending CN109543568A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811313676.0A CN109543568A (en) 2018-11-06 2018-11-06 A kind of vehicle-logo location method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811313676.0A CN109543568A (en) 2018-11-06 2018-11-06 A kind of vehicle-logo location method

Publications (1)

Publication Number Publication Date
CN109543568A true CN109543568A (en) 2019-03-29

Family

ID=65844548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811313676.0A Pending CN109543568A (en) 2018-11-06 2018-11-06 A kind of vehicle-logo location method

Country Status (1)

Country Link
CN (1) CN109543568A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110110658A (en) * 2019-05-07 2019-08-09 杭州鸿泉物联网技术股份有限公司 A kind of includes the image segmentation processing method and device of lane line
CN110572573A (en) * 2019-09-17 2019-12-13 Oppo广东移动通信有限公司 Focusing method and device, electronic equipment and computer readable storage medium
CN113172989A (en) * 2021-04-02 2021-07-27 广州诚鼎机器人有限公司 Colloid recognition method, screen frame nesting method and elliptical printing machine

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080049969A1 (en) * 2006-08-25 2008-02-28 Jason David Koziol Methods And Systems For Generating A Symbol Identification Challenge For An Automated Agent
CN103093202A (en) * 2013-01-21 2013-05-08 信帧电子技术(北京)有限公司 Car logo locating method and car logo locating device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080049969A1 (en) * 2006-08-25 2008-02-28 Jason David Koziol Methods And Systems For Generating A Symbol Identification Challenge For An Automated Agent
CN103093202A (en) * 2013-01-21 2013-05-08 信帧电子技术(北京)有限公司 Car logo locating method and car logo locating device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李梦: "基于智能图像处理的车标识别研究", 《中国优秀硕士学位论文全文数据库信息科技辑(月刊)》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110110658A (en) * 2019-05-07 2019-08-09 杭州鸿泉物联网技术股份有限公司 A kind of includes the image segmentation processing method and device of lane line
CN110110658B (en) * 2019-05-07 2020-12-08 杭州鸿泉物联网技术股份有限公司 Image segmentation processing method and device containing lane lines
CN110572573A (en) * 2019-09-17 2019-12-13 Oppo广东移动通信有限公司 Focusing method and device, electronic equipment and computer readable storage medium
CN110572573B (en) * 2019-09-17 2021-11-09 Oppo广东移动通信有限公司 Focusing method and device, electronic equipment and computer readable storage medium
CN113172989A (en) * 2021-04-02 2021-07-27 广州诚鼎机器人有限公司 Colloid recognition method, screen frame nesting method and elliptical printing machine
CN113172989B (en) * 2021-04-02 2022-08-19 广州诚鼎机器人有限公司 Colloid recognition method, screen frame nesting method and elliptical printing machine

Similar Documents

Publication Publication Date Title
Soilán et al. Traffic sign detection in MLS acquired point clouds for geometric and image-based semantic inventory
CN103366602B (en) Method of determining parking lot occupancy from digital camera images
CN105608417B (en) Traffic lights detection method and device
CN109359684A (en) A fine-grained vehicle identification method based on weakly supervised localization and subcategory similarity measure
CN114898296B (en) Bus lane occupation detection method based on millimeter wave radar and vision fusion
CN108710875A (en) A kind of take photo by plane road vehicle method of counting and device based on deep learning
Salehi et al. Automatic moving vehicles information extraction from single-pass WorldView-2 imagery
CN105160309A (en) Three-lane detection method based on image morphological segmentation and region growing
CN107871126A (en) Model recognizing method and system based on deep-neural-network
CN105667518A (en) Lane detection method and device
Huang et al. Spatial-temproal based lane detection using deep learning
CN105005989B (en) A kind of vehicle target dividing method under weak contrast
Tao et al. Scene context-driven vehicle detection in high-resolution aerial images
Wang et al. 3-D point cloud object detection based on supervoxel neighborhood with Hough forest framework
CN114519819B (en) Remote sensing image target detection method based on global context awareness
Hinz et al. Car detection in aerial thermal images by local and global evidence accumulation
CN107944403A (en) Pedestrian&#39;s attribute detection method and device in a kind of image
CN107273832A (en) Licence plate recognition method and system based on integrating channel feature and convolutional neural networks
CN114049572A (en) Detection method for identifying small target
CN108319952A (en) A kind of vehicle characteristics extracting method and device
CN109543568A (en) A kind of vehicle-logo location method
Yang et al. Road intersection identification from crowdsourced big trace data using Mask‐RCNN
Zhang et al. An approach focusing on the convolutional layer characteristics of the VGG network for vehicle tracking
CN104267209B (en) Method and system for expressway video speed measurement based on virtual coils
CN110909656B (en) Pedestrian detection method and system integrating radar and camera

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190329

RJ01 Rejection of invention patent application after publication