CN110263635B - Marker detection and identification method based on structural forest and PCANet - Google Patents
Marker detection and identification method based on structural forest and PCANet Download PDFInfo
- Publication number
- CN110263635B CN110263635B CN201910396062.1A CN201910396062A CN110263635B CN 110263635 B CN110263635 B CN 110263635B CN 201910396062 A CN201910396062 A CN 201910396062A CN 110263635 B CN110263635 B CN 110263635B
- Authority
- CN
- China
- Prior art keywords
- image
- marker
- forest
- pcanet
- edge
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 239000003550 marker Substances 0.000 title claims abstract description 73
- 238000000034 method Methods 0.000 title claims abstract description 53
- 238000001514 detection method Methods 0.000 title claims abstract description 33
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 51
- 238000000605 extraction Methods 0.000 claims abstract description 35
- 238000012549 training Methods 0.000 claims abstract description 33
- 238000013507 mapping Methods 0.000 claims abstract description 17
- 238000012545 processing Methods 0.000 claims abstract description 12
- 238000000513 principal component analysis Methods 0.000 claims description 17
- 238000003708 edge detection Methods 0.000 claims description 14
- 238000003066 decision tree Methods 0.000 claims description 12
- 239000011159 matrix material Substances 0.000 claims description 12
- 230000002708 enhancing effect Effects 0.000 claims description 11
- 238000007637 random forest analysis Methods 0.000 claims description 11
- 230000008569 process Effects 0.000 claims description 10
- 239000013598 vector Substances 0.000 claims description 9
- 238000000926 separation method Methods 0.000 claims description 8
- 230000000694 effects Effects 0.000 claims description 7
- 230000006870 function Effects 0.000 claims description 7
- 238000007781 pre-processing Methods 0.000 claims description 5
- 238000012937 correction Methods 0.000 claims description 4
- 238000004458 analytical method Methods 0.000 claims description 3
- 238000001914 filtration Methods 0.000 claims description 3
- 238000003064 k means clustering Methods 0.000 claims description 3
- 230000009467 reduction Effects 0.000 claims description 3
- 230000000007 visual effect Effects 0.000 claims description 3
- 238000012935 Averaging Methods 0.000 claims description 2
- 150000001875 compounds Chemical class 0.000 claims 2
- 238000005260 corrosion Methods 0.000 claims 1
- 230000007797 corrosion Effects 0.000 claims 1
- 238000013139 quantization Methods 0.000 claims 1
- 239000010410 layer Substances 0.000 description 17
- 238000004364 calculation method Methods 0.000 description 7
- 238000002474 experimental method Methods 0.000 description 4
- 230000006872 improvement Effects 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000011156 evaluation Methods 0.000 description 3
- 238000013135 deep learning Methods 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 238000002360 preparation method Methods 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 238000011002 quantification Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000007621 cluster analysis Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000877 morphologic effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000011176 pooling Methods 0.000 description 1
- 230000008092 positive effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 239000002356 single layer Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
- G06F18/2135—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on approximation criteria, e.g. principal component analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
- G06F18/23213—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/243—Classification techniques relating to the number of classes
- G06F18/24323—Tree-organised classifiers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/48—Extraction of image or video features by mapping characteristic values of the pattern into a parameter space, e.g. Hough transformation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/56—Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
- G06V20/58—Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
- G06V20/582—Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads of traffic signs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20172—Image enhancement details
- G06T2207/20192—Edge enhancement; Edge preservation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30248—Vehicle exterior or interior
- G06T2207/30252—Vehicle exterior; Vicinity of vehicle
- G06T2207/30256—Lane; Road marking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V2201/00—Indexing scheme relating to image or video recognition or understanding
- G06V2201/09—Recognition of logos
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Multimedia (AREA)
- Probability & Statistics with Applications (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本发明属于自动目标识别技术领域,尤其涉及一种基于结构森林和PCANet的标志物检测与识别方法。The invention belongs to the technical field of automatic target recognition, and in particular relates to a marker detection and recognition method based on structural forest and PCANet.
背景技术Background technique
道路标志物的检测与识别,是机器视觉在应用领域中的重要组成部分,可以提供可靠的目标位置信息,实现车辆在特定场景中的定位功能,被广泛应用于自动驾驶、驾驶员辅助系统和视觉导航等领域中。通常标志物的检测与识别可以描述为:在特定的场景中,根据获取到的场景标志物信息,采用特定的图像预处理方法,对图像中的标志物特征结构进行提取,送入分类器进行计算,最终得到识别结果。具体的工作过程为:The detection and recognition of road markers is an important part of machine vision in the application field. It can provide reliable target position information and realize the positioning function of vehicles in specific scenarios. It is widely used in automatic driving, driver assistance systems and visual navigation, etc. Usually the detection and recognition of markers can be described as: in a specific scene, according to the obtained scene marker information, a specific image preprocessing method is used to extract the feature structure of the markers in the image, and send them to the classifier for processing. Calculate and finally get the recognition result. The specific working process is:
(1)首先获取已知场景中图像信息,结合图像中标志物的结构特征,设计不同的图像处理方法,减少图像中无关区域的干扰,同时增强图像中标志物的特征结构,便于后续的特征描述子的计算;(1) First obtain the image information in the known scene, combine the structural features of the markers in the image, design different image processing methods, reduce the interference of irrelevant areas in the image, and at the same time enhance the feature structure of the markers in the image, which is convenient for subsequent features. Descriptor calculation;
(2)然后在特征提取的过程中,按照一定的规则,对预处理后的图像序列,设计标志物候选区域的提取方法;(2) Then, in the process of feature extraction, according to certain rules, for the preprocessed image sequence, design a method for extracting candidate regions of markers;
(3)最后,将待识别的候选区域进行模板匹配或者送入分类器进行计算,达到标志物识别的目的。(3) Finally, the candidate regions to be identified are subjected to template matching or sent to the classifier for calculation, so as to achieve the purpose of marker identification.
目前,对于标志物检测与识别的方法,可以分为两种:基于传统特征提取的方法和基于机器学习的方法。基于传统特征提取的方法,根据标志物的结构特征,采用一系列的复杂处理来获取图像梯度特征,用于标志物模板的制作,往往带来准备工作繁琐、计算复杂、识别效率低等缺点。这主要是由于利用特征点和特征描述子的形式,算法性能受限于不同光照条件下阈值的选取,通用性较差,在实际的运行过程中,往往需要根据环境调节算法的阈值,特征提取较为繁琐。同时,算法识别的准确率和模板匹配的数量有关,为了提高特征提取的准确性,往往是以增加特征维数或者采用多尺度模板为代价,计算复杂度大,识别的准确率较低。基于机器学习的方法,通过构建大量的数据集和优化训练策略,用于标志物的检测与识别,极大地提升了识别的准确率,但也带来了训练数据集大、实时性不理想的情况。为了达到较好的识别分类效果,需要采集大量的标志物图像,制作标志物的训练集和测试集,导致训练数据集较大,并且需要制定不同的训练策略,用于优化网络参数。同时,由于特征提取采用的是多层卷积架构,特征提取的维度较高,计算复杂度大,实时性不理想。因此,有必要研究一种轻量级的网络架构用于标志物的识别,在降低训练数据集和提升实时性方面进行,简洁高效的实现标志物的检测与识别,为车辆提供相应的辅助信息。At present, there are two methods for marker detection and recognition: methods based on traditional feature extraction and methods based on machine learning. Based on the traditional feature extraction method, according to the structural features of the markers, a series of complex processing is used to obtain image gradient features, which are used for the production of marker templates. This is mainly due to the use of feature points and feature descriptors, the performance of the algorithm is limited by the selection of thresholds under different lighting conditions, and the versatility is poor. In the actual operation process, it is often necessary to adjust the threshold of the algorithm according to the environment. more complicated. At the same time, the accuracy of algorithm recognition is related to the number of template matching. In order to improve the accuracy of feature extraction, it is often at the expense of increasing feature dimensions or using multi-scale templates, which results in high computational complexity and low recognition accuracy. The method based on machine learning, by constructing a large number of data sets and optimizing the training strategy, is used for the detection and recognition of markers, which greatly improves the accuracy of the recognition, but also brings about large training data sets and unsatisfactory real-time performance. Happening. In order to achieve a better recognition and classification effect, it is necessary to collect a large number of marker images and create a training set and a test set of the markers, resulting in a large training data set, and different training strategies need to be formulated to optimize the network parameters. At the same time, since the feature extraction adopts a multi-layer convolution architecture, the dimension of feature extraction is high, the computational complexity is large, and the real-time performance is not ideal. Therefore, it is necessary to study a lightweight network architecture for the identification of markers, in terms of reducing the training data set and improving the real-time performance, to realize the detection and identification of markers concisely and efficiently, and to provide corresponding auxiliary information for vehicles .
综上所述,现有技术存在的问题是:现有的特征提取与识别方法过度依赖特征描述子参数的选取、数据集的制备、计算复杂、识别效率低。To sum up, the problems existing in the prior art are: the existing feature extraction and identification methods are overly dependent on the selection of the feature descriptor sub-parameters, the preparation of the data set, the complex computation, and the low identification efficiency.
解决上述技术问题的难度:在车辆到达预定场地中,需要对路面标志物进行识别,辅助人员进行决策。路面标志物检测与识别主要针对的是道路表面的标志物,包括:车道线、箭头、线型标志物、区域标志物、光学字符等。针对复杂特殊的应用场景,考虑到光照的变化、阴影和标志物的遮挡以及图像畸变等外界影响因素,如何实时准确的对辅助线和区域标志物进行检测与识别依然是难点问题。The difficulty of solving the above technical problems: When the vehicle arrives at the predetermined site, it is necessary to identify the road markers and assist the personnel to make decisions. The detection and recognition of road markers is mainly aimed at the markers on the road surface, including: lane lines, arrows, linear markers, regional markers, optical characters, etc. For complex and special application scenarios, considering external factors such as changes in illumination, occlusion of shadows and markers, and image distortion, it is still difficult to accurately detect and identify auxiliary lines and regional markers in real time.
解决上述技术问题的意义:为了克服现有方法严重依特征描述子参数的选取、训练数据集大、计算复杂、实时性差等问题。有必要在特征提取方面,采用增强标志物特征结构对比的处理方法,提高特征点和特征描述子的稳定性。同时,在标志物识别阶段,采用轻量级的网络架构,在保证标志物识别的准确率的基础上,提升标志物识别的实时性。The significance of solving the above technical problems: In order to overcome the problems of the existing methods, such as the selection of sub-parameters based on the feature description, the large training data set, the complex calculation, and the poor real-time performance. In the aspect of feature extraction, it is necessary to adopt a processing method that enhances the feature structure comparison of markers to improve the stability of feature points and feature descriptors. At the same time, in the marker recognition stage, a lightweight network architecture is adopted to improve the real-time performance of marker recognition on the basis of ensuring the accuracy of marker recognition.
发明内容SUMMARY OF THE INVENTION
针对现有技术存在的问题,本发明提供了一种基于结构森林和PCANet的标志物检测与识别方法。In view of the problems existing in the prior art, the present invention provides a marker detection and identification method based on structural forest and PCANet.
本发明是这样实现的,一种基于结构森林和PCANet的标志物检测与识别方法,所述基于结构森林和PCANet的标志物检测与识别方法包括以下步骤:The present invention is achieved in this way, a marker detection and identification method based on structural forest and PCANet, the marker detection and identification method based on structural forest and PCANet comprises the following steps:
第一步,图像预处理;获取视频图像序列,结合摄像机的内部参数,对图像进行畸变校正;采用基于结构森林的边缘检测算法,得到图像边缘结构的映射图;The first step is image preprocessing; obtain a video image sequence, and combine the internal parameters of the camera to perform distortion correction on the image; use the edge detection algorithm based on the structure forest to obtain a map of the image edge structure;
第二步,候选区域的提取;对于辅助线及角点区域提取,根据获取的边缘结构映射图像的基础上,通过基于骨架提取的动态聚类算法,采用K3M顺序迭代的方法提取辅助线的骨架,并在Hough空间对直线进行聚类分析,若直线判断为某一类直线簇的内点,则在现有直线簇的类别中进行更新;若直线判断为直线簇的外点,则同时更新直线簇的类别和数量,利用最小二乘算法拟合辅助线,并求解直线间交点作为角点区域。对于典型标志物区域提取,为了增强标志物区域和背景之间的边缘结构差异,根据公式对边缘结构映射图像中的背景与标志物的边缘结构进行增强处理;采用MSER特征检测器,对图像中的最大稳定极值区域进行提取,若满足设置的条件,则作为标志物的候选区;否则,作为干扰区域,删除该区域;对边缘结构映射图像中的背景与标志物的边缘结构进行增强处理的公式为:The second step is the extraction of candidate regions; for the extraction of auxiliary lines and corner regions, on the basis of the obtained edge structure mapping image, the skeleton of the auxiliary line is extracted by the dynamic clustering algorithm based on skeleton extraction, and the K3M sequential iteration method is used. , and perform cluster analysis on the line in Hough space. If the line is judged to be the inner point of a certain type of line cluster, it will be updated in the category of the existing line cluster; if the line is judged to be the outer point of the line cluster, it will be updated at the same time. The category and number of straight line clusters, the least squares algorithm is used to fit auxiliary lines, and the intersections between the straight lines are solved as corner points. For the extraction of typical marker regions, in order to enhance the edge structure difference between the marker region and the background, the edge structure of the background and the marker in the edge structure map image is enhanced according to the formula; Extract the maximum stable extremum region of , if it meets the set conditions, it is used as the candidate region of the marker; otherwise, as the interference region, delete the region; the background and the edge structure of the marker in the edge structure mapping image are enhanced. The formula is:
Ibd=Igray-Iedge;I bd =I gray -I edge ;
Idb=(1-Iedge)-Igray;I db =(1-I edge )-I gray ;
式中,Igray为输入图像的灰度图,Ibd为对图像中亮度高于其它图像区域的边缘进行增强的结果,Idb为对图像中亮度低于其它图像区域边缘进行增强的结果;In the formula, I gray is the grayscale image of the input image, I bd is the result of enhancing the edge of the image whose brightness is higher than that of other image regions, and I db is the result of enhancing the edge of the image whose brightness is lower than that of other image regions;
第三步,标志物的识别;根据生成的角点及标志物候选区域,分别计算候选区域的二值化哈希编码,得到扩展直方图特征;采用预训练的PCANet结构的分类器进行分类识别。The third step is the identification of markers; according to the generated corner points and the candidate regions of the markers, the binarized hash codes of the candidate regions are calculated respectively to obtain the extended histogram feature; the classifier of the pre-trained PCANet structure is used for classification and identification .
进一步,所述步骤一具体包括:Further, the step 1 specifically includes:
随机森林是由N棵独立的决策树Ti(x)构成的,每一棵决策树由分层的节点组成。对于每一棵决策树Ti(x),给定其对应的训练集根据节点分离信息增益Ij最大的原则,可确定分离函数为:Random forest is composed of N independent decision trees T i (x), each decision tree is composed of hierarchical nodes. For each decision tree T i (x), given its corresponding training set According to the principle that the node separation information gain I j is the largest, the separation function can be determined as:
式中,其中θj为使信息增益最大化的参数;θj={k,γ},k为x的某一量化的特征,γ为该特征对应的阈值;通过递归训练节点分离函数和直到达到了预定的决策树深度或者信息增益的阈值;信息增益定义为:In the formula, where θ j is the parameter that maximizes the information gain; θ j ={k,γ}, k is a quantized feature of x, and γ is the threshold corresponding to the feature; the node separation function is trained recursively and Until a predetermined decision tree depth or information gain threshold is reached; information gain is defined as:
式中,H(Sj)为香农熵,py为训练数据集Sj对应输出标签y的概率;In the formula, H(S j ) is the Shannon entropy, and py is the probability of the output label y corresponding to the training data set S j ;
计算Ij,对于每一个节点j,将该节点中所有标签y映射到离散化标签c,采用c代替y计算Ij:Calculate I j , for each node j, map all labels y in the node to discretized labels c, and use c instead of y to calculate I j :
结构化随机森林的输出,是将高维的输出标签y映射为二元向量。为了降低计算量,采用K-means聚类或者主成分分析的降维量化法,判断具有相似输出标签y的节点是否属于同一标志物,给出节点的具体标签编号C(1,2,…,k);在训练的过程中,采用BSDS500作为结构化随机森林的训练集,得到基于结构森林的边缘检测模型,用于边缘检测。The output of the structured random forest is to map the high-dimensional output label y to a binary vector. In order to reduce the amount of calculation, K-means clustering or the dimensionality reduction quantification method of principal component analysis is used to judge whether the nodes with similar output labels y belong to the same marker, and the specific label number C(1,2,…, k); In the process of training, BSDS500 is used as the training set of structured random forest, and the edge detection model based on structured forest is obtained for edge detection.
进一步,所述步骤二具体包括:采用K3M顺序迭代算法,该算法分为两步,首先提取伪骨架,按照固定的旋转方向,对像素点的邻域进行连通性分析,通过不断地迭代腐蚀,去除标志物的外轮廓,提取出像素宽度为2的伪骨架;然后,对伪骨架上各像素点的8邻域进行权重编码,提取出图像的真实骨架;Further, the second step specifically includes: adopting the K3M sequential iterative algorithm, which is divided into two steps. First, the pseudo-skeleton is extracted, and the neighborhood of the pixel points is analyzed according to the fixed rotation direction. Remove the outer contour of the marker, and extract a pseudo-skeleton with a pixel width of 2; then, perform weight coding on the 8 neighborhoods of each pixel on the pseudo-skeleton to extract the real skeleton of the image;
将骨架提取得到的直线簇lj转换到Hough空间后的坐标为(ρj,θj),对其进行直线聚类,其中θ∈[0,180°);将θ等间隔划分为180个小区间,对所有的角度进行投票,然后计算每一类的直线长度总和:The coordinates of the straight line cluster l j obtained from the skeleton extraction are converted to Hough space as (ρ j , θ j ), and the straight line clustering is performed on it, where θ∈[0,180°); θ is equally spaced into 180 small intervals , vote for all the angles, and then calculate the sum of the straight line lengths for each class:
式中,n为直线聚类数,m为每一类直线簇的数量,lengthj表示检测到的直线长度,当lengthj>λ时,该区间内的所有直线簇作为新的直线进行聚类,λ为辅助线长度的最小阈值;In the formula, n is the number of straight line clusters, m is the number of straight line clusters of each type, and length j represents the length of the detected straight line. When length j > λ, all straight line clusters in the interval are clustered as new straight lines. , λ is the minimum threshold of auxiliary line length;
在对图像进行高斯滤波后,采用结构森林的训练模型,可以得到结构边缘的映射图;MSER特征对于高于周围亮度或低于周围亮度的区域具有较好的提取效果;对图像中边缘结构进行增强处理后,采用MSER特征对最大稳定极值区域的进行提取对于边缘增强的图像表示为:After Gaussian filtering is performed on the image, the training model of the structural forest can be used to obtain the map of the structural edge; the MSER feature has a better extraction effect for areas with higher or lower brightness than the surrounding brightness; After the enhancement processing, the MSER feature is used to extract the maximum stable extreme value region, and the edge-enhanced image is expressed as:
Ibd=Igray-Iedge;I bd =I gray -I edge ;
Idb=(1-Iedge)-Igray;I db =(1-I edge )-I gray ;
式中,Igray为输入图像的灰度图,Ibd为对图像中亮度高于其它图像区域的边缘进行增强的结果,Idb为对图像中亮度低于其它图像区域边缘进行增强的结果。In the formula, I gray is the grayscale image of the input image, I bd is the result of enhancing the edge of the image whose brightness is higher than other image areas, and I db is the result of enhancing the edge of the image whose brightness is lower than other image areas.
进一步,在对图像增强处理后,图像的标志物和背景的区域边缘会存在明显的差别;采用MSER特征检测器可以对区域中具有相似颜色信息的像素点进行提取,提取出图像中的极值稳定区域;同时,通过设置标志物的相关限制条件,可以减少候选区域的数量;约束条件为:Further, after the image enhancement processing, there will be obvious differences between the image markers and the edge of the background area; the MSER feature detector can be used to extract pixels with similar color information in the area, and extract the extreme values in the image. Stable region; at the same time, the number of candidate regions can be reduced by setting the relevant constraints of the markers; the constraints are:
(a)面积比约束:在MSER区域中,所有的像素点的填充面积与候选区域的最小外接矩形之比,用于去除图像中的曲线车道标志物;(a) Area ratio constraint: in the MSER area, the ratio of the filling area of all pixels to the minimum enclosing rectangle of the candidate area is used to remove the curved lane markers in the image;
(b)长宽比约束:候选区的最小外接矩形的宽和高的比例,用于去除图像中的细小裂缝区域;(b) Aspect ratio constraint: the ratio of the width and height of the smallest circumscribed rectangle of the candidate region, which is used to remove small crack regions in the image;
(c)宽度约束:标志物候选区的宽度限制范围,设置为图像宽度的百分比;(c) Width constraint: the width limit range of the marker candidate area, set as a percentage of the image width;
(d)高度约束:标志物候选区的高度限制范围,设置为图像高度的百分比。(d) Height constraint: the height limit range of the landmark candidate area, set as a percentage of the image height.
进一步,所述步骤三的具体实现步骤如下:对于输入的图像,PCANet结构包含零均值化和PCA滤波器的操作,通过求解前k个特征向量构成图像特征的映射矩阵,第一层的PCA滤波器表示为:Further, the specific implementation steps of the third step are as follows: for the input image, the PCANet structure includes the operation of zero averaging and PCA filter, and the mapping matrix of image features is formed by solving the first k feature vectors, and the PCA filter of the first layer is filtered. is expressed as:
式中,k1×k2为滑动窗口的大小,ql(XXT)为求取图像特征的前n个特征向量,Wl 1为协方差矩阵的前L1个最大特征值对应的特征映射矩阵;经过两层PCA滤波器后,对输出值进行二值化哈希编码,输出的编码位数与第二层的滤波器个数L2相同,表示为:In the formula, k 1 ×k 2 is the size of the sliding window, q l (XX T ) is the first n eigenvectors to obtain image features, and W l 1 is the feature corresponding to the first L 1 largest eigenvalues of the covariance matrix Mapping matrix; after two layers of PCA filters, the output value is subjected to binary hash coding, and the number of output coding bits is the same as the number of filters in the second layer L 2 , which is expressed as:
对于第一层输出的矩阵,将其分为B块,统计其哈希编码值,并将其直方图特征进行级联,构成扩展直方图特征,表示图像提取的特征:For the matrix output by the first layer, it is divided into B blocks, the hash code value is counted, and its histogram features are cascaded to form extended histogram features, which represent the features of image extraction:
式中,表示各子直方图的特征,其输出的是维度为的向量。In the formula, Represents the characteristics of each sub-histogram, and its output is the dimension of vector.
本发明的另一目的在于提供一种应用所述基于结构森林和PCANet的标志物检测与识别方法的自动驾驶控制系统。Another object of the present invention is to provide an automatic driving control system applying the method for marker detection and recognition based on structural forest and PCANet.
本发明的另一目的在于提供一种应用所述基于结构森林和PCANet的标志物检测与识别方法的驾驶员辅助系统。Another object of the present invention is to provide a driver assistance system applying the method for marker detection and recognition based on structural forest and PCANet.
本发明的另一目的在于提供一种应用所述基于结构森林和PCANet的标志物检测与识别方法的视觉导航控制系统。Another object of the present invention is to provide a visual navigation control system using the method for marker detection and recognition based on structural forest and PCANet.
综上所述,本发明的优点及积极效果为:本发明针对特殊场景下的路面标志物检测与识别中存在特征结构对比不明显、训练数据集小、实时性不理想的问题,设计了一种基于结构森林和PCANet的标志物检测与识别方法。采用基于结构化随机森林的边缘检测算法,得到图像中的边缘结构特征,利用动态聚类算法获取辅助线及角点候选区域,并采用图像增强算法获取最大稳定极值区域,最后采用轻量级网络结构PCANet对候选区域进行识别。本发明能够克服标志物对比不明显、训练数据集较小的难题,为驾驶人员实时提供辅助信息具有重要意义。To sum up, the advantages and positive effects of the present invention are as follows: the present invention designs a method for the problems of inconspicuous feature structure comparison, small training data set, and unsatisfactory real-time performance in the detection and recognition of road markers in special scenarios. A structured forest and PCANet-based marker detection and recognition method. The edge detection algorithm based on structured random forest is used to obtain the edge structure features in the image, the auxiliary line and corner candidate regions are obtained by the dynamic clustering algorithm, and the maximum stable extreme value region is obtained by the image enhancement algorithm. The network structure PCANet identifies candidate regions. The present invention can overcome the problems of inconspicuous marker comparison and small training data set, and it is of great significance to provide auxiliary information for drivers in real time.
附图说明Description of drawings
图1是本发明实施例提供的基于结构森林和PCANet的标志物检测与识别方法流程图。FIG. 1 is a flowchart of a method for detecting and identifying markers based on structural forest and PCANet provided by an embodiment of the present invention.
图2是本发明实施例提供的基于结构森林和PCANet的标志物检测与识别的结构示意图。FIG. 2 is a schematic structural diagram of marker detection and identification based on structural forest and PCANet provided by an embodiment of the present invention.
图3是本发明实施例提供的基于结构森林和PCANet的标志物检测与识别方法实现流程图。FIG. 3 is a flowchart for implementing a method for detecting and identifying markers based on structural forest and PCANet provided by an embodiment of the present invention.
图4是本发明实施例提供的各阶段处理结果图;Fig. 4 is the processing result diagram of each stage provided by the embodiment of the present invention;
(a)原图(b)基于结构森林的边缘检测(c)角点及候选区域(d)标志物识别结果。(a) Original image (b) Edge detection based on structural forest (c) Corner and candidate region (d) Marker recognition results.
图5是本发明实施例提供的对比结果图;Fig. 5 is the contrast result diagram that the embodiment of the present invention provides;
图中:(a)对比算法1的实验结果;(b)对比算法2的实验结果;(c)对比算法3的实验结果;(d)本发明算法的实验结果。In the figure: (a) the experimental results of the comparison algorithm 1; (b) the experimental results of the comparison algorithm 2; (c) the experimental results of the comparison algorithm 3; (d) the experimental results of the algorithm of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
本发明为了克服特征提取与识别方法过度依赖数据集的制备、计算复杂、识别效率低等缺点;针对特殊场景下的路面标志物检测与识别问题,提出一种基于结构森林和PCANet结构的标志物检测与识别方法。首先,基于结构森林对路面标志物的边缘结构进行检测;然后,针对场景中的辅助线和典型标志物,采用基于骨架提取的动态聚类算法提取辅助线及角点特征区域,通过基于图像增强处理的最大稳定极值区域特征检测算法确定典型标志物的候选区域;最后,采用PCANet结构对候选区域进行标志物识别。In order to overcome the shortcomings of feature extraction and identification methods that rely too much on the preparation of data sets, complex calculation, and low identification efficiency, the invention proposes a marker based on structural forest and PCANet structure for the detection and identification of road markers in special scenarios. detection and identification methods. First, the edge structure of pavement landmarks is detected based on the structural forest; then, for the auxiliary lines and typical landmarks in the scene, the dynamic clustering algorithm based on skeleton extraction is used to extract the auxiliary lines and corner feature regions, and the auxiliary lines and corner feature regions are extracted based on image enhancement. The processed maximum stable extreme value region feature detection algorithm determines the candidate regions of typical markers; finally, the candidate regions are identified by the PCANet structure.
下面结合附图对本发明的应用原理作详细的描述。The application principle of the present invention will be described in detail below with reference to the accompanying drawings.
如图1所示,本发明实施例提供的基于结构森林和PCANet的标志物检测与识别方法包括以下步骤:As shown in FIG. 1 , the method for detecting and identifying markers based on structural forest and PCANet provided by an embodiment of the present invention includes the following steps:
S101:通过图像预处理阶段,针对复杂场景下标志物边缘结构特征不明显的问题,采用结构化随机森林,对于目标的边缘特征进行检测;S101: Through the image preprocessing stage, for the problem that the edge structure features of markers are not obvious in complex scenes, a structured random forest is used to detect the edge features of the target;
S102:在候选区域的生成阶段,根据获取的边缘结构映射图,分别采用动态聚类算法和改进的最大稳定极值区域特征提取算法,对图像中标志物的候选区进行提取;S102: In the generation stage of the candidate region, according to the obtained edge structure map, the dynamic clustering algorithm and the improved maximum stable extreme value region feature extraction algorithm are respectively used to extract the candidate region of the marker in the image;
S103:根据实际场景目标,制作目标训练集对PCANet进行训练,对候选的标志物区域进行识别。S103: According to the actual scene target, make a target training set to train PCANet, and identify candidate marker regions.
本发明实施例提供的基于结构森林和PCANet的标志物检测与识别方法具体包括以下步骤:The method for detecting and identifying markers based on structural forest and PCANet provided by the embodiment of the present invention specifically includes the following steps:
(1)图像预处理;首先,获取视频图像序列,结合摄像机的内部参数,对图像进行畸变校正,然后,采用基于结构森林的边缘检测算法,得到图像边缘结构的映射图;(1) Image preprocessing; first, obtain a video image sequence, and combine the internal parameters of the camera to perform distortion correction on the image, and then use the edge detection algorithm based on the structure forest to obtain a map of the image edge structure;
(2)候选区域的提取。对于辅助线及角点区域提取,根据获取的边缘结构映射图像的基础上,通过基于骨架提取的动态聚类算法,采用K3M顺序迭代的方法提取辅助线的骨架,并在Hough空间对直线进行聚类分析,若直线判断为某一类直线簇的内点,则在现有直线簇的类别中进行更新;若直线判断为直线簇的外点,则同时更新直线簇的类别和数量,利用最小二乘算法拟合辅助线,并求解直线间交点作为角点区域。对于典型标志物区域提取,为了增强标志物区域和背景之间的边缘结构差异,根据公式(7)和(8)对边缘结构映射图像中的背景与标志物的边缘结构进行增强处理,然后,采用MSER特征检测器,对图像中的最大稳定极值区域进行提取,若满足设置的条件,则作为标志物的候选区;否则,作为干扰区域,删除该区域;(2) Extraction of candidate regions. For the extraction of auxiliary lines and corner areas, based on the obtained edge structure mapping image, the skeleton of the auxiliary lines is extracted by the K3M sequential iteration method through the dynamic clustering algorithm based on skeleton extraction, and the lines are clustered in Hough space. Class analysis, if the line is judged to be the inner point of a certain type of line cluster, it will be updated in the category of the existing line cluster; if the line is judged to be the outer point of the line cluster, the category and number of the line cluster will be updated at the same time. The quadratic algorithm fits the auxiliary lines and solves the intersection between the lines as the corner area. For typical marker region extraction, in order to enhance the edge structure difference between the marker region and the background, the edge structure of the background and the marker in the edge structure map image is enhanced according to formulas (7) and (8), and then, The MSER feature detector is used to extract the maximum stable extreme value area in the image. If the set conditions are met, it will be used as the candidate area of the marker; otherwise, as the interference area, the area will be deleted;
(3)标志物的识别;根据生成的角点及标志物候选区域,分别计算候选区域的二值化哈希编码,得到扩展直方图特征,然后采用预训练的PCANet结构的分类器进行分类识别。(3) Marker identification; according to the generated corner points and marker candidate regions, the binarized hash codes of the candidate regions are calculated respectively to obtain the extended histogram feature, and then the pre-trained PCANet structure classifier is used for classification and identification .
下面结合附图对本发明的应用原理作进一步的描述。The application principle of the present invention will be further described below with reference to the accompanying drawings.
本发明实施例提供的基于结构森林和PCANet的标志物检测与识别方法,算法的实现流程如图3所示,包括以下步骤:The method for detecting and identifying markers based on structural forest and PCANet provided by the embodiment of the present invention, the implementation process of the algorithm is shown in Figure 3, and includes the following steps:
步骤一:获取视频图像序列,结合摄像机的内部参数,对图像进行畸变校正,然后,采用基于结构森林的边缘检测算法,得到图像边缘结构的映射图;Step 1: Obtain a video image sequence, and combine the internal parameters of the camera to perform distortion correction on the image, and then use the edge detection algorithm based on the structure forest to obtain a map of the image edge structure;
步骤二:针对场景中辅助线和典型标志物,在图像边缘结构映射图的基础上,采用基于骨架提取的动态聚类算法,提取辅助线及角点特征候选区域,同时采用基于图像增强处理的最大稳定极值区域特征检测算法,确定典型标志物的候选区域;Step 2: Aiming at the auxiliary lines and typical markers in the scene, on the basis of the image edge structure map, the dynamic clustering algorithm based on skeleton extraction is used to extract the auxiliary lines and corner feature candidate areas, and the image enhancement processing-based Maximum stable extreme value region feature detection algorithm to determine candidate regions of typical markers;
步骤三:根据生成的标志物候选区域,分别计算候选区域的二值化哈希编码,得到扩展直方图特征,然后采用预训练的PCANet结构的分类器进行分类识别。Step 3: According to the generated marker candidate regions, the binary hash codes of the candidate regions are calculated respectively to obtain the extended histogram feature, and then the pre-trained PCANet structure classifier is used for classification and identification.
本发明进一步的改进在于,步骤一的具体实现步骤如下:A further improvement of the present invention is that the specific implementation steps of step 1 are as follows:
随机森林是由N棵独立的决策树Ti(x)构成的,每一棵决策树由分层的节点组成。对于每一棵决策树Ti(x),给定其对应的训练集根据节点分离信息增益Ij最大的原则,可确定分离函数为:Random forest is composed of N independent decision trees T i (x), each decision tree is composed of hierarchical nodes. For each decision tree T i (x), given its corresponding training set According to the principle that the node separation information gain I j is the largest, the separation function can be determined as:
式中,其中θj为使信息增益最大化的参数;θj={k,γ},k为x的某一量化的特征,γ为该特征对应的阈值。通过递归训练节点分离函数和直到达到了预定的决策树深度或者信息增益的阈值。信息增益可以定义为:In the formula, where θ j is a parameter that maximizes the information gain; θ j ={k,γ}, k is a quantized feature of x, and γ is a threshold corresponding to the feature. Train node separation function recursively and Until a predetermined decision tree depth or information gain threshold is reached. Information gain can be defined as:
式中,H(Sj)为香农熵,py为训练数据集Sj对应输出标签y的概率。In the formula, H(S j ) is the Shannon entropy, and py is the probability of the training data set S j corresponding to the output label y .
为了便于计算Ij,对于每一个节点j,将该节点中所有标签y映射到离散化标签c,便可以采用c代替y计算Ij:In order to facilitate the calculation of I j , for each node j, all labels y in the node are mapped to the discretized label c, and c can be used instead of y to calculate I j :
结构化随机森林的输出,是将高维的输出标签y映射为二元向量。为了降低计算量,采用K-means聚类或者主成分分析的降维量化法,判断具有相似输出标签y的节点是否属于同一标志物,给出节点的具体标签编号C(1,2,…,k)。在训练的过程中,采用BSDS500作为结构化随机森林的训练集,得到基于结构森林的边缘检测模型,用于边缘检测。The output of the structured random forest is to map the high-dimensional output label y to a binary vector. In order to reduce the amount of calculation, K-means clustering or the dimensionality reduction quantification method of principal component analysis is used to judge whether the nodes with similar output labels y belong to the same marker, and the specific label number C(1,2,…, k). In the process of training, BSDS500 is used as the training set of structured random forest, and the edge detection model based on structured forest is obtained for edge detection.
本发明进一步的改进在于,步骤二的具体实现步骤如下:A further improvement of the present invention is that the specific implementation steps of step 2 are as follows:
在对图像边缘检测的结果二值化处理后,会带来噪声、标志物轮廓边缘不连续等问题的影响,需要采用形态学滤波的方法,对图像进行膨胀和去噪平滑等处理,得到较为完整的标志物轮廓区域。为了便于表达辅助线的位置和方向,对形态学滤波后的图像采用细化操作提取骨架。本发明采用K3M顺序迭代算法,该算法分为两步,首先提取伪骨架,按照固定的旋转方向,对像素点的邻域进行连通性分析,通过不断地迭代腐蚀,去除标志物的外轮廓,提取出像素宽度为2的伪骨架;然后,对伪骨架上各像素点的8邻域进行权重编码,提取出图像的真实骨架。After the binarization of the image edge detection result, it will bring about the influence of noise, discontinuous edge of marker contour and other problems. It is necessary to use the method of morphological filtering to expand, denoise and smooth the image. Complete marker contour area. In order to express the position and direction of the auxiliary lines, the skeleton is extracted by thinning operation on the morphologically filtered image. The invention adopts the K3M sequential iterative algorithm, which is divided into two steps. First, the pseudo-skeleton is extracted, and the neighborhood of the pixel point is analyzed for connectivity according to the fixed rotation direction. A pseudo-skeleton with a pixel width of 2 is extracted; then, weight coding is performed on the 8 neighborhoods of each pixel on the pseudo-skeleton to extract the real skeleton of the image.
在骨架提取的基础上,由于图像中的点较少,采用HoughP变换可以高效的检测出骨架所在的直线。然受限于同一条辅助线所提取的骨架上的点并非严格的在同一直线上,需要对同一条辅助线对应的直线簇进行聚类。由于场景中的直线数量和方向的不确定,需要采用动态聚类算法。本发明将骨架提取得到的直线簇lj转换到Hough空间后的坐标为(ρj,θj),对其进行直线聚类,其中θ∈[0,180°)。在此,将θ等间隔划分为180个小区间,对所有的角度进行投票,然后计算每一类的直线长度总和:On the basis of skeleton extraction, since there are few points in the image, HoughP transform can efficiently detect the straight line where the skeleton is located. However, because the points on the skeleton extracted by the same auxiliary line are not strictly on the same straight line, it is necessary to cluster the line clusters corresponding to the same auxiliary line. Due to the uncertainty of the number and direction of straight lines in the scene, a dynamic clustering algorithm is required. The present invention converts the straight line cluster l j obtained by skeleton extraction into the Hough space, and the coordinate is (ρ j , θ j ), and performs line clustering on it, where θ∈[0,180°). Here, divide θ into 180 cells at equal intervals, vote for all angles, and then calculate the sum of the straight line lengths for each class:
式中,n为直线聚类数,m为每一类直线簇的数量,lengthj表示检测到的直线长度,当lengthj>λ时,该区间内的所有直线簇作为新的直线进行聚类,λ为辅助线长度的最小阈值。In the formula, n is the number of straight line clusters, m is the number of straight line clusters of each type, and length j represents the length of the detected straight line. When length j > λ, all straight line clusters in the interval are clustered as new straight lines. , λ is the minimum threshold of auxiliary line length.
改进的MSER特征提取。在不同的光照条件下,标志物的亮度均会发生变化,本发明在对图像进行高斯滤波后,采用结构森林的训练模型,可以得到结构边缘的映射图。而MSER特征对于高于周围亮度或低于周围亮度的区域具有较好的提取效果。因此,本发明对图像中边缘结构进行增强处理后,采用MSER特征对最大稳定极值区域的进行提取。对于边缘增强的图像可以表示为:Improved MSER feature extraction. Under different lighting conditions, the brightness of the markers will change. After the Gaussian filter is performed on the image, the training model of the structural forest can be used in the present invention to obtain the map of the structural edge. The MSER feature has a better extraction effect for areas with higher or lower brightness than the surrounding brightness. Therefore, in the present invention, after the edge structure in the image is enhanced, the MSER feature is used to extract the maximum stable extreme value region. The edge-enhanced image can be expressed as:
Ibd=Igray-Iedge (7)I bd =I gray -I edge (7)
Idb=(1-Iedge)-Igray (8)I db =(1-I edge )-I gray (8)
式中,Igray为输入图像的灰度图,Ibd为对图像中亮度高于其它图像区域的边缘进行增强的结果,Idb为对图像中亮度低于其它图像区域边缘进行增强的结果。In the formula, I gray is the grayscale image of the input image, I bd is the result of enhancing the edge of the image whose brightness is higher than other image areas, and I db is the result of enhancing the edge of the image whose brightness is lower than other image areas.
在对图像增强处理后,图像的标志物和背景的区域边缘会存在明显的差别。采用MSER特征检测器可以对区域中具有相似颜色信息的像素点进行提取,提取出图像中的极值稳定区域。同时,通过设置标志物的相关限制条件,可以减少候选区域的数量。如表1所示,约束条件为:After image enhancement processing, there will be obvious differences between the landmarks of the image and the area edges of the background. Using the MSER feature detector, the pixels with similar color information in the region can be extracted, and the extreme stable region in the image can be extracted. At the same time, the number of candidate regions can be reduced by setting the relevant constraints of the markers. As shown in Table 1, the constraints are:
(a)面积比约束:在MSER区域中,所有的像素点的填充面积与候选区域的最小外接矩形之比,主要用于去除图像中的曲线车道标志物;(a) Area ratio constraint: in the MSER area, the ratio of the filling area of all pixels to the minimum enclosing rectangle of the candidate area is mainly used to remove the curved lane markers in the image;
(b)长宽比约束:候选区的最小外接矩形的宽和高的比例,主要用于去除图像中的细小裂缝区域;(b) Aspect ratio constraint: the ratio of the width and height of the smallest circumscribed rectangle of the candidate area, which is mainly used to remove small crack areas in the image;
(c)宽度约束:标志物候选区的宽度限制范围,设置为图像宽度的百分比;(c) Width constraint: the width limit range of the marker candidate area, set as a percentage of the image width;
(d)高度约束:标志物候选区的高度限制范围,设置为图像高度的百分比。(d) Height constraint: the height limit range of the landmark candidate area, set as a percentage of the image height.
本发明进一步的改进在于,步骤三的具体实现步骤如下:A further improvement of the present invention is that the specific implementation steps of step 3 are as follows:
PCANet分类器是由一个PCANet结构和一个一对多的SVM分类器构成。与一般的深度学习网络结构不同的是,PCANet采用了主成分分析(PCA)网络结构替代深度学习网络的卷积层,非线性层采用的是二值化哈希编码,池化层采用的是块状直方图,通过对块状直方图进行级联,构成图像的扩展直方图特征。对于输入的图像,PCANet结构一般包含零均值化和PCA滤波器的操作,通过求解前k个特征向量构成图像特征的映射矩阵,那么第一层的PCA滤波器可以表示为:The PCANet classifier is composed of a PCANet structure and a one-to-many SVM classifier. Different from the general deep learning network structure, PCANet uses a principal component analysis (PCA) network structure to replace the convolutional layer of the deep learning network, the nonlinear layer uses binary hash coding, and the pooling layer uses Block histogram, by concatenating block histograms, constitutes the extended histogram feature of the image. For the input image, the PCANet structure generally includes the operation of zero-average and PCA filter. By solving the first k feature vectors to form the mapping matrix of image features, the PCA filter of the first layer can be expressed as:
式中,k1×k2为滑动窗口的大小,ql(XXT)为求取图像特征的前n个特征向量,Wl 1为协方差矩阵的前L1个最大特征值对应的特征映射矩阵。经过两层PCA滤波器后,对输出值进行二值化哈希编码,输出的编码位数与第二层的滤波器个数L2相同,可以表示为:In the formula, k 1 ×k 2 is the size of the sliding window, q l (XX T ) is the first n eigenvectors to obtain image features, and W l 1 is the feature corresponding to the first L 1 largest eigenvalues of the covariance matrix Mapping matrix. After two layers of PCA filters, the output value is subjected to binary hash encoding, and the number of encoded bits of the output is the same as the number of filters in the second layer L 2 , which can be expressed as:
对于第一层输出的矩阵,将其分为B块,统计其哈希编码值,并将其直方图特征进行级联,构成扩展直方图特征,表示图像提取的特征:For the matrix output by the first layer, it is divided into B blocks, the hash code value is counted, and its histogram features are cascaded to form extended histogram features, which represent the features of image extraction:
式中,表示各子直方图的特征,其输出的是维度为的向量。In the formula, Represents the characteristics of each sub-histogram, and its output is the dimension of vector.
参数优化。对于PCANet结构,参数的选择需要根据具体的目标任务,包括卷积层数,滤波器大小和数量,滑窗的步长等参数。在实验中发现,两层PCA滤波器结构的识别效果高于单层PCA滤波器结构,但是继续增加PCA滤波器的层数并不能大幅提升识别的准确率。因此,本发明选择两层PCA滤波器的结构。同时,滤波器的个数越多,PCANet的识别效果越好。考虑到实际应用场景中的标志物类别,在本发明中每层选择8个PCA滤波器,即可达到识别的要求。并且,根据滑窗重叠区域的面积比,PCANet的适用场景不同,在此设置区域重叠面积比为0.5。Parameter optimization. For the PCANet structure, the selection of parameters needs to be based on the specific target task, including parameters such as the number of convolutional layers, the size and number of filters, and the step size of the sliding window. In the experiment, it is found that the recognition effect of the two-layer PCA filter structure is higher than that of the single-layer PCA filter structure, but continuing to increase the number of layers of the PCA filter cannot greatly improve the recognition accuracy. Therefore, the present invention selects the structure of the two-layer PCA filter. At the same time, the more the number of filters, the better the recognition effect of PCANet. Considering the types of markers in practical application scenarios, in the present invention, 8 PCA filters are selected for each layer to meet the identification requirements. Moreover, according to the area ratio of the overlapping area of the sliding window, the applicable scenarios of PCANet are different, and the area overlapping area ratio is set to 0.5 here.
模型训练。本发明根据实际的应用场景,制作了场景中标志物的图像训练集。图像训练数据集主要包括了9类目标,其中:8类标志物的区域样本,包括场景中的圆形标志物和辅助线各角点区域;1类为负样本,根据采集的图像随机分割区域,并进行人工筛选确保没有分割到标志物样本。同时,为了增加样本的多样性,对数据集中的图像加入镜像、畸变、角度调整等处理步骤。在训练PCANet的过程中,将具有相似结构特征的标志物进行合并训练与识别。图像训练集由400张图像组成,每一类由100张标志物图像组成,主要可以分为四类:圆形标志物、“+”字型标志物、“∟”字型标志物和负样本。Model training. According to the actual application scene, the present invention produces an image training set of markers in the scene. The image training data set mainly includes 9 types of targets, among which: 8 types of markers are regional samples, including the circular markers in the scene and the corner areas of the auxiliary lines; 1 type is a negative sample, and the area is randomly divided according to the collected images. , and perform manual screening to ensure that no marker samples are segmented. At the same time, in order to increase the diversity of samples, processing steps such as mirroring, distortion, and angle adjustment are added to the images in the dataset. In the process of training PCANet, the markers with similar structural features are combined for training and identification. The image training set consists of 400 images, and each category consists of 100 marker images, which can be divided into four categories: circular markers, “+” markers, “∟” markers, and negative samples .
下面结合实验对本发明的应用效果作详细的描述。The application effect of the present invention will be described in detail below in conjunction with experiments.
为验证本发明的有效性,分别从算法的有效性、准确性和实时性能进行分析验证,实验中程序的运行环境为VS2013配置Opencv2.4.10图像处理库,使用的图像大小均为320×240。In order to verify the validity of the present invention, the validity, accuracy and real-time performance of the algorithm are analyzed and verified respectively. The operating environment of the program in the experiment is VS2013 configured with Opencv2.4.10 image processing library, and the image size used is 320×240.
(1)算法有效性验证(1) Algorithm validity verification
采用本发明的算法,对图像的测试数据集进行标志物的检测与识别,实验结果如图4所示。图像4(a)为在场景中采集的不同标志物的图像序列;图4(b)为基于结构森林的边缘检测结果,可以看出,采用该算法能够有效去除背景中的斑点等非结构特征的干扰;图4(c)为提取到的辅助线角点和典型标志物的候选区域,包含由背景中车轮、地面裂缝等干扰因素产生的候选区域,其中,辅助线用蓝色直线表示,辅助线角点用绿色圆点表示,生成的标志物候选区域用绿色矩形框表示,从候选区域生成的结果看,大部分角点和标志物区域能够有效提取,但是在部分场景中的边缘及角点区域未能有效提取,这与辅助线在动态聚类过程中的响应阈值有关;图4(d)为标志物识别的结果,对于提取的候选区域,PCANet通过对相应的候选区域进行二值化哈希编码以及主成分分析,可以有效识别出干扰区域和标志物区域,识别为标志物的区域采用黄色的矩形框表示。The algorithm of the present invention is used to detect and identify markers on the test data set of images, and the experimental results are shown in FIG. 4 . Image 4(a) is the image sequence of different markers collected in the scene; Fig. 4(b) is the edge detection result based on structural forest, it can be seen that the algorithm can effectively remove non-structural features such as spots in the background Figure 4(c) shows the extracted candidate regions for corner points of auxiliary lines and typical markers, including candidate regions generated by interference factors such as wheels and ground cracks in the background, where the auxiliary lines are represented by blue straight lines, The corners of the auxiliary line are represented by green dots, and the generated marker candidate area is represented by a green rectangle. From the results of the candidate area generation, most of the corners and marker areas can be effectively extracted, but in some scenes the edges and The corner area could not be effectively extracted, which is related to the response threshold of the auxiliary line in the dynamic clustering process; Figure 4(d) is the result of marker recognition. The valued hash coding and principal component analysis can effectively identify the interference area and the marker area, and the area identified as the marker is represented by a yellow rectangle.
(2)性能对比验证(2) Performance comparison verification
构建4种对比算法,如表1所示。对比算法1,不采用基于结构森林和PCANet结构的分类器,由于HougP直线检测无法有效提取背景直线,采用LSD检测的直线聚类和MSER特征提取,标志物的识别采用HOG特征和SVM构建的分类器;对比算法2,采用基于结构森林的图像增强处理,标志物识别采用HOG特征和SVM构建的分类器;对比算法3,不采用基于结构森林的图像增强,而采用传统的LSD算法对直线簇进行动态聚类,标志物识别采用基于PCANet结构的分类器;本发明算法,则采用基于结构森林和PCANet结构,对标志物进行检测与识别。实验对比结果如图5所示。Four comparison algorithms were constructed, as shown in Table 1. Compared with Algorithm 1, the classifier based on the structure forest and PCANet structure is not used. Since the HougP line detection cannot effectively extract the background line, the LSD detection line clustering and MSER feature extraction are used, and the HOG feature and the classification constructed by SVM are used to identify the markers Contrast Algorithm 2, using image enhancement processing based on structural forest, marker recognition using HOG features and a classifier constructed by SVM; Contrasting Algorithm 3, instead of using structural forest-based image enhancement, the traditional LSD algorithm is used to detect linear clusters. For dynamic clustering, the marker identification adopts the classifier based on the PCANet structure; the algorithm of the present invention adopts the structure forest and the PCANet structure to detect and identify the markers. The experimental comparison results are shown in Figure 5.
在表2~表5中,分别给出了本发明算法和对比算法的准确率、查全率、综合评价指标和平均耗时的实验统计结果。从实验结果看,本发明的算法在对标志物的检测与识别过程中,算法的平均准确率达到91.63%,综合评价指标为93.39%,准确率和综合评价指标均高于对比算法,具有较好的鲁棒性。并且,本发明算法的单帧平均耗时为51.41ms,高于其它三种对比算法,达到了实时性的要求。In Tables 2 to 5, the experimental statistical results of the accuracy, recall, comprehensive evaluation index and average time-consuming of the algorithm of the present invention and the comparison algorithm are respectively given. From the experimental results, in the process of detecting and identifying markers, the algorithm of the present invention has an average accuracy rate of 91.63% and a comprehensive evaluation index of 93.39%. good robustness. Moreover, the average time-consuming of a single frame of the algorithm of the present invention is 51.41 ms, which is higher than that of the other three comparison algorithms, and meets the requirement of real-time performance.
表1候选区域约束条件Table 1 Constraints of candidate regions
表2实验中对比算法的结构Table 2 The structure of the comparison algorithm in the experiment
表3实验结果中准确率P的统计结果Statistical results of the accuracy rate P in the experimental results of Table 3
表4实验结果中查全率R的统计结果Statistical results of recall rate R in table 4 experimental results
表5实验结果中综合评价指标F的统计结果Statistical results of the comprehensive evaluation index F in the experimental results of Table 5
表6各算法单帧耗时的统计结果Table 6 Statistical results of single-frame time-consuming of each algorithm
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included in the protection of the present invention. within the range.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910396062.1A CN110263635B (en) | 2019-05-14 | 2019-05-14 | Marker detection and identification method based on structural forest and PCANet |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910396062.1A CN110263635B (en) | 2019-05-14 | 2019-05-14 | Marker detection and identification method based on structural forest and PCANet |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110263635A CN110263635A (en) | 2019-09-20 |
CN110263635B true CN110263635B (en) | 2022-09-09 |
Family
ID=67913193
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910396062.1A Active CN110263635B (en) | 2019-05-14 | 2019-05-14 | Marker detection and identification method based on structural forest and PCANet |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110263635B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111783604A (en) * | 2020-06-24 | 2020-10-16 | 中国第一汽车股份有限公司 | Vehicle control method, device and equipment based on target identification and vehicle |
CN112052723A (en) * | 2020-07-23 | 2020-12-08 | 深圳市玩瞳科技有限公司 | Literacy card, and desktop scene STR method and device based on image recognition |
CN113065428A (en) * | 2021-03-21 | 2021-07-02 | 北京工业大学 | Automatic driving target identification method based on feature selection |
CN113971697B (en) * | 2021-09-16 | 2024-08-02 | 中国人民解放军火箭军工程大学 | Air-ground cooperative vehicle positioning and orientation method |
CN114283144B (en) * | 2022-03-06 | 2022-05-17 | 山东金有粮脱皮制粉设备有限公司 | Intelligent control method for stable operation of corncob crusher based on image recognition |
CN116243353B (en) * | 2023-03-14 | 2024-02-27 | 广西壮族自治区自然资源遥感院 | Forest right investigation and measurement method and system based on Beidou positioning |
CN116993740B (en) * | 2023-09-28 | 2023-12-19 | 山东万世机械科技有限公司 | Concrete structure surface defect detection method based on image data |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
NL2014772B1 (en) * | 2015-05-06 | 2017-01-26 | Univ Erasmus Med Ct Rotterdam | A lumbar navigation method, a lumbar navigation system and a computer program product. |
CN105550709B (en) * | 2015-12-14 | 2019-01-29 | 武汉大学 | A kind of remote sensing image power transmission line corridor wood land extracting method |
WO2017177259A1 (en) * | 2016-04-12 | 2017-10-19 | Phi Technologies Pty Ltd | System and method for processing photographic images |
CN106878674B (en) * | 2017-01-10 | 2019-08-30 | 哈尔滨工业大学深圳研究生院 | A parking detection method and device based on surveillance video |
CN107704865A (en) * | 2017-05-09 | 2018-02-16 | 北京航空航天大学 | Fleet Targets Detection based on the extraction of structure forest edge candidate region |
CN109254654B (en) * | 2018-08-20 | 2022-02-01 | 杭州电子科技大学 | Driving fatigue feature extraction method combining PCA and PCANet |
-
2019
- 2019-05-14 CN CN201910396062.1A patent/CN110263635B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN110263635A (en) | 2019-09-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110263635B (en) | Marker detection and identification method based on structural forest and PCANet | |
CN107230202B (en) | Method and system for automatic identification of pavement disease images | |
CN109271991B (en) | License plate detection method based on deep learning | |
CN104392212B (en) | A Vision-Based Road Information Detection and Front Vehicle Recognition Method | |
CN110866430B (en) | License plate recognition method and device | |
CN107122776A (en) | A kind of road traffic sign detection and recognition methods based on convolutional neural networks | |
CN109255350B (en) | New energy license plate detection method based on video monitoring | |
CN110706235B (en) | Far infrared pedestrian detection method based on two-stage cascade segmentation | |
CN107895492A (en) | A kind of express highway intelligent analysis method based on conventional video | |
WO2020000253A1 (en) | Traffic sign recognizing method in rain and snow | |
CN102722707A (en) | License plate character segmentation method based on connected region and gap model | |
CN101859382A (en) | A license plate detection and recognition method based on the maximum stable extremum region | |
CN112488046B (en) | A lane line extraction method based on high-resolution UAV images | |
He et al. | A feature fusion method to improve the driving obstacle detection under foggy weather | |
CN107092876A (en) | The low-light (level) model recognizing method combined based on Retinex with S SIFT features | |
CN103824091A (en) | Vehicle license plate recognition method for intelligent transportation system | |
CN112818775B (en) | Method and system for fast identification of forest roads based on region boundary pixel exchange | |
CN108960055A (en) | A kind of method for detecting lane lines based on local line's stage mode feature | |
CN106570475B (en) | A kind of dark-red enameled pottery seal search method | |
CN111382658B (en) | Road traffic sign detection method in natural environment based on image gray gradient consistency | |
CN105893970A (en) | Nighttime road vehicle detection method based on luminance variance characteristics | |
CN110060221B (en) | A Bridge Vehicle Detection Method Based on UAV Aerial Images | |
CN109325487B (en) | Full-category license plate recognition method based on target detection | |
CN114299247A (en) | Rapid detection and problem troubleshooting method for road traffic sign lines | |
CN113033363A (en) | Vehicle dense target detection method based on deep learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |