CN111860501A - Image recognition method of high-speed rail height adjustment rod falling out fault based on shape matching - Google Patents
Image recognition method of high-speed rail height adjustment rod falling out fault based on shape matching Download PDFInfo
- Publication number
- CN111860501A CN111860501A CN202010674818.7A CN202010674818A CN111860501A CN 111860501 A CN111860501 A CN 111860501A CN 202010674818 A CN202010674818 A CN 202010674818A CN 111860501 A CN111860501 A CN 111860501A
- Authority
- CN
- China
- Prior art keywords
- image
- point
- feature
- pyramid
- gradient
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B61—RAILWAYS
- B61C—LOCOMOTIVES; MOTOR RAILCARS
- B61C17/00—Arrangement or disposition of parts; Details or accessories not otherwise provided for; Use of control gear and control systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/44—Local 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
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/75—Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
- G06V10/751—Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Multimedia (AREA)
- Data Mining & Analysis (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Evolutionary Biology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Computational Biology (AREA)
- Databases & Information Systems (AREA)
- Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Quality & Reliability (AREA)
- Automation & Control Theory (AREA)
- Transportation (AREA)
- Mechanical Engineering (AREA)
- Image Analysis (AREA)
Abstract
基于形状匹配的高铁高度调整杆脱出故障图像识别方法,属于高铁检测技术领域。本发明是为了解决现有的检测方法存在检测时间较长的问题,不能兼顾检测时间和准确率的问题。本发明首先提取图像中包含检测部件区域的图像,并提取对应的模板图像并创建图像特征金字塔,分别进行边缘提取并对特征点进行最离散采样;对特征点提取特征点梯度信息;然后对搜索图片建立特征金字塔得到的粗定位结果,计算模板图像的图像边缘点和搜索图片的图像边缘点的相似性,将原来的模板轮廓转变为矫正轮廓线;然后采用最小二乘法进一步矫正,最后基于模板图像和搜索结果,通过逻辑分析对精细定位的部件图像进行故障判定。主要用于高铁高度调整杆脱出故障图像识别。
An image recognition method for a high-speed rail height adjustment rod falling out fault based on shape matching belongs to the technical field of high-speed rail detection. The present invention is to solve the problem that the existing detection method has a long detection time and cannot take into account the problem of the detection time and the accuracy. The invention firstly extracts the image including the detection part area in the image, and extracts the corresponding template image and creates the image feature pyramid, respectively carries out edge extraction and most discrete sampling of the feature points; extracts the feature point gradient information from the feature points; The coarse positioning result obtained by establishing the feature pyramid of the image, the similarity between the image edge points of the template image and the image edge points of the search image is calculated, and the original template contour is converted into a corrected contour line; then the least squares method is used for further correction, and finally based on the template Images and search results, through logic analysis to make fault determinations on finely positioned component images. Mainly used for image recognition of high-speed rail height adjustment rods falling out.
Description
技术领域technical field
本发明涉及高铁高度调整杆脱出故障图像识别方法。属于高铁检测技术领域。The invention relates to an image recognition method for a high-speed rail height adjustment rod falling out fault. It belongs to the technical field of high-speed rail detection.
背景技术Background technique
高铁列车具有速度快运行稳定的特点,已经成为目前人们出行的主要交通工具之一。高铁的运行安全性是重中之重,所以需要格外重视。高度调整杆脱出是一种危及行车安全的故障,会导致列车在行进过程中出现侧翻等严重后果。High-speed trains have the characteristics of fast speed and stable operation, and have become one of the main means of transportation for people at present. The operation safety of high-speed rail is the top priority, so it needs special attention. The disengagement of the height adjustment rod is a kind of fault that endangers the driving safety, which will lead to serious consequences such as the rollover of the train during the traveling process.
在传统故障检测方法中,通常采用人工检查图像的方式进行故障检测。由于检车人员在工作过程中极易出现疲劳、遗漏等情况,造成漏检、错检的出现,影响行车安全。In traditional fault detection methods, fault detection is usually performed by manually checking images. Due to the fact that the inspectors are prone to fatigue and omissions during their work, resulting in missed inspections and wrong inspections, affecting driving safety.
针对以上问题,随着图像处理技术和深度学习技术的飞速发展,目前可以引入图像自动识别检测方法对高度调整杆脱出故障进行检测,采用图像自动识别的方式具有检测效率高和稳定性好的优点。利用神经网络处理技术进行检测检测时,如果要保证较高的识别准确率,那么就要有针对性的搭建网络模型并训练模型,这不仅需要花费很多的人力物力,也不一定能够取得较好的效果,而且利用神经网络进行检测时检测时间相对较长,有待于进一步提高。同时如果要取得加好的效果,一般需要模型的深度较大,则会进一步延长检测时间,同时对于硬件要求比较高。In view of the above problems, with the rapid development of image processing technology and deep learning technology, the automatic image recognition detection method can be introduced to detect the height adjustment rod coming out fault. The automatic image recognition method has the advantages of high detection efficiency and good stability. . When using neural network processing technology for detection and detection, if you want to ensure a high recognition accuracy, you must build a network model and train the model in a targeted manner, which not only requires a lot of manpower and material resources, and may not be able to achieve better results. Moreover, the detection time is relatively long when the neural network is used for detection, which needs to be further improved. At the same time, if a better effect is to be achieved, the depth of the model is generally required to be larger, which will further extend the detection time, and at the same time, the hardware requirements are relatively high.
发明内容SUMMARY OF THE INVENTION
本发明是为了解决现有的检测方法存在检测时间较长的问题,不能兼顾检测时间和准确率的问题。The present invention is to solve the problem that the existing detection method has a long detection time and cannot take into account the problem of the detection time and the accuracy.
基于形状匹配的高铁高度调整杆脱出故障图像识别方法,包括以下步骤:An image recognition method for high-speed rail height adjustment rod disengagement faults based on shape matching, including the following steps:
s1、采集图像并提取包含检测部件区域的图像;并提取检测部件区域对应的模板图像;s1. Collect an image and extract an image containing the detection component area; and extract a template image corresponding to the detection component area;
s2、对模板图像创建图像特征金字塔;s2. Create an image feature pyramid for the template image;
s3、确定了金字塔层数后,针对于每层图像特征金字塔,分别进行边缘提取并对特征点进行最离散采样;对特征点提取特征点梯度信息;s3. After the number of pyramid layers is determined, for each layer of image feature pyramids, edge extraction is performed respectively and feature points are most discretely sampled; feature point gradient information is extracted for feature points;
s4、在每层图像特征金字塔上,对提取到的最离散边缘点进行旋转;s4. On each layer of image feature pyramid, rotate the extracted most discrete edge points;
s5、对搜索图片建立特征金字塔;s5. Build a feature pyramid for the search image;
取金字塔最高层的模板图像在搜索图片金字塔最高层进行全角度的滑窗遍历;将相似度最高的作为匹配结果;将此结果向下一层金字塔映射,直到图像特征金字塔的第一层,即图像原始分辨率层,完成粗定位;Take the template image of the highest level of the pyramid and perform a full-angle sliding window traversal at the highest level of the search image pyramid; take the one with the highest similarity as the matching result; map this result to the next level of the pyramid until the first level of the image feature pyramid, that is Image original resolution layer to complete coarse positioning;
s6、针对于金字塔搜索后得到的粗定位结果,将模板图像轮廓点经过金字塔粗定位的结果进行仿射变换到搜索图片上对应的点记作P,对P点的主梯度与搜索图片边缘点主梯度进行相似性计算,将相似性最高的搜索图片上的点作为边缘点A,再将P替换为A,将原来的模板轮廓转变为矫正轮廓线;s6. For the coarse positioning result obtained after the pyramid search, perform affine transformation on the result of the rough positioning of the template image contour point to the corresponding point on the search image as P, and compare the main gradient of point P and the edge point of the search image. The main gradient is used to calculate the similarity, and the point on the search image with the highest similarity is used as the edge point A, and then P is replaced by A, and the original template outline is converted into a corrected outline;
s7、采用最小二乘法进一步矫正,矫正以特征点到特征线的距离最短作为优化目标进行迭代;其中特征点为模板图像边缘点经过变形矫正后的得到的模板图像的边缘点P;特征线为在搜索图像上距离点P最近的搜索物体上的临近边缘点对应的切线;s7. Use the least squares method for further correction, and the correction takes the shortest distance from the feature point to the feature line as the optimization goal to iterate; the feature point is the edge point P of the template image obtained after the edge point of the template image is deformed and corrected; the feature line is The tangent corresponding to the adjacent edge point on the search object closest to the point P on the search image;
s8、基于模板图像和搜索结果,通过逻辑分析对精细定位的部件图像进行故障判定。s8. Based on the template image and the search result, perform fault determination on the finely positioned component image through logical analysis.
优选地,步骤s6所述相似性计算是基于如下相似度量函数计算的;Preferably, the similarity calculation described in step s6 is calculated based on the following similarity measure function;
其中,d‘i为模板图片中点i的梯度,表示d′i的转置;ei′为搜索图片上被模板覆盖的子区域中i的对应点i′的梯度;n表示点i的总数;(t′i,u′i)及(v,w)分别为d′i与ei′的x、y方向上的梯度分量。Among them, d' i is the gradient of point i in the template image, represents the transposition of d'i; e i' is the gradient of the corresponding point i' of i in the sub-region covered by the template on the search image; n represents the total number of points i; (t' i , u' i ) and (v , w) are the gradient components in the x and y directions of d′ i and e i′ respectively.
优选地,所述步骤s2对模板图像创建图像特征金字塔的过程包括以下步骤:Preferably, the process of creating an image feature pyramid for the template image in the step s2 includes the following steps:
a、对输入图像进行特征提取,获得特征图;a. Perform feature extraction on the input image to obtain a feature map;
b、设定金字塔初始层数L=0;b. Set the initial number of pyramid layers L=0;
c、对特征图,从L层开始逐层创建图像特征金字塔;c. For the feature map, create an image feature pyramid layer by layer starting from the L layer;
d、根据初始采样率ratio对当前层金字塔图像进行特征采样;d. Perform feature sampling on the current layer pyramid image according to the initial sampling rate ratio;
e、如果边缘点数N大于第一阈值同时小于第二阈值,则跳出流程使用当前金字塔层数;e. If the number of edge points N is greater than the first threshold and less than the second threshold, jump out of the process and use the current pyramid level;
f、如果边缘点数N大于第二阈值,则将L更新为L+1,跳转步骤c;f. If the number of edge points N is greater than the second threshold, update L to L+1, and jump to step c;
g、如果边缘点数N大于0小于第一阈值,则L=0,同时将采样率除1.5,跳转步骤c;g. If the number of edge points N is greater than 0 and less than the first threshold, then L=0, at the same time divide the sampling rate by 1.5, and jump to step c;
h、循环步骤e到g,直到满足步骤e。h. Loop steps e to g until step e is satisfied.
优选地,所述第一阈值为40,所述第二阈值为60。Preferably, the first threshold is 40, and the second threshold is 60.
优选地,步骤s8所述的通过逻辑分析对精细定位的部件图像进行故障判定的过程包括以下步骤:Preferably, the process of performing fault determination on the finely positioned component images through logical analysis described in step s8 includes the following steps:
1)根据轴距等先验信息,得到子图;1) Obtain subgraphs according to prior information such as wheelbase;
2)分别对高度调整杆及调整杆安装底座方块进行匹配;2) Match the height adjustment rod and the adjustment rod mounting base block respectively;
3)计算调整杆下边缘坐标(x1,y1)及安装座方块下边坐标(x2,y2),及安装做高度height;3) Calculate the coordinates of the lower edge of the adjustment rod (x1, y1) and the coordinates of the lower side of the mounting block (x2, y2), and the installation height;
4)计算比例ratio=(y2-y1)/height;4) Calculate the ratio ratio=(y2-y1)/height;
5)如果ratio>0.3则判定为故障。5) If ratio>0.3, it is judged as failure.
优选地,步骤s2对模板图像创建图像特征金字塔所述的图像特征金字塔采用最大值金字塔。Preferably, step s2 uses the maximum value pyramid for the image feature pyramid described in creating the image feature pyramid for the template image.
优选地,步骤s3所述对特征点提取特征点梯度信息的具体过程包括以下步骤:Preferably, the specific process of extracting feature point gradient information for feature points described in step s3 includes the following steps:
针对于特征点的坐标,将包括当前特征点在内的3邻域内9个点进行梯度量化;For the coordinates of feature points, gradient quantization is performed on 9 points in 3 neighborhoods including the current feature point;
梯度量化是指将梯度方向量化为8个代表方向,分别为11.25°、33.75°、56.25°、78.75°、101.25°、123.75°、146.25°及168.75°;Gradient quantization refers to quantizing the gradient direction into 8 representative directions, namely 11.25°, 33.75°, 56.25°, 78.75°, 101.25°, 123.75°, 146.25° and 168.75°;
针对于当前特征点,将其坐标周围3邻域内9个点的梯度方向向8个量化方向进行规整,如果当前点的梯度方向落在0°到22.5°范围内,则使用11.25°作为代表;如果当前点的梯度方向落在22.5°到45°范围内,则使用33.75°作为代表;如果梯度方向落在45°到67.5°范围内,则使用56.25°作为代表;如果当前点的梯度方向落在67.5°到90°范围内,则使用78.75°作为代表;如果当前点的梯度方向落在67.5°到90°范围内,以22.5°为一个单位,对90°到180°的范围,采用8个代表方向中的具体值进行规整;For the current feature point, adjust the gradient directions of 9 points in 3 neighborhoods around its coordinates to 8 quantization directions. If the gradient direction of the current point falls within the range of 0° to 22.5°, use 11.25° as a representative; If the gradient direction of the current point falls within the range of 22.5° to 45°, use 33.75° as the representative; if the gradient direction of the current point falls within the range of 45° to 67.5°, use 56.25° as the representative; if the gradient direction of the current point falls In the range of 67.5° to 90°, use 78.75° as a representative; if the gradient direction of the current point falls within the range of 67.5° to 90°, take 22.5° as a unit, and for the range of 90° to 180°, use 8 The specific values in each representative direction are regularized;
针对于当前特征点,进行梯度传递:For the current feature point, gradient transfer is performed:
梯度传递是将9个邻域点的梯度方向向中心点汇合,并取汇合后的平均方向作为最终的梯度方向。Gradient transfer is to merge the gradient directions of the 9 neighbor points to the center point, and take the average direction after the convergence as the final gradient direction.
优选地,步骤s4所述对提取到的最离散边缘点进行旋转的过程包括以下步骤:Preferably, the process of rotating the extracted most discrete edge points described in step s4 includes the following steps:
旋转步长设置为底层0.5°,随着层数增加逐层乘2,超过8°则保持8°不变。The rotation step size is set to 0.5° for the bottom layer, and it is multiplied by 2 as the number of layers increases. If it exceeds 8°, it remains unchanged at 8°.
优选地,s7中特征线为在搜索图像上距离点P最近的搜索物体上的临近边缘点对应的切线所述距离点P最近的搜索物体上的临近边缘点确定过程包括以下步骤:Preferably, the characteristic line in s7 is the tangent line corresponding to the adjacent edge point on the search object closest to the point P on the search image. The process of determining the adjacent edge point on the search object closest to the point P includes the following steps:
以变换后的模板图像边缘点P为中心画矩形,遍历矩形范围内所有搜索图像边缘点,分别计算每个边缘点与点P的距离,取距离最小的点为最临近边缘点A;Draw a rectangle with the transformed template image edge point P as the center, traverse all the search image edge points within the rectangle, calculate the distance between each edge point and point P, and take the point with the smallest distance as the closest edge point A;
或者,or,
以变换后的模板图像边缘点P为起点,将该点的梯度所在直线与搜索图片边缘的交点作为最临近边缘点B。Taking the transformed template image edge point P as the starting point, the intersection of the straight line where the gradient of this point is located and the edge of the search image is taken as the nearest edge point B.
优选地,所述模板图像和搜索图片在创建图像特征金字塔之前需要经过预处理,所述的预处理过程包括膨胀、腐蚀、滤波形态学处理。Preferably, before creating the image feature pyramid, the template image and the search image need to be preprocessed, and the preprocessing process includes dilation, erosion, and filtering morphological processing.
有益效果:Beneficial effects:
1、将自动识别技术引入高铁故障检测,实现故障自动识别及报警,人工只需对报警结果进行确认,有效节约人力成本,提高作业质量和作业效率。1. Introduce automatic identification technology into high-speed rail fault detection to realize automatic fault identification and alarm, and only need to confirm the alarm results manually, which effectively saves labor costs and improves operation quality and operation efficiency.
2、将基于形状的模板匹配算法应用到高铁高度调整杆脱出故障自动识别中,相较传统的机器视觉检测方法具有更高的准确性、稳定性。同时本发明具有速度快稳定性强的优点的优点,可以在有效提高检测准确率的同时保证检测速度。2. The shape-based template matching algorithm is applied to the automatic identification of the failure of the height adjustment rod of the high-speed rail, which has higher accuracy and stability than the traditional machine vision detection method. At the same time, the invention has the advantages of fast speed and strong stability, and can effectively improve the detection accuracy while ensuring the detection speed.
3、本发明对原始算法进行改进,新增局部变形矫正匹配方法,可有效解决由于车速变化或相机拍摄视角不同导致的图像变形,从而无法识别的问题。3. The present invention improves the original algorithm and adds a local deformation correction and matching method, which can effectively solve the problem of unrecognizable image deformation caused by changes in vehicle speed or different camera angles of view.
4、本发明对原始算法进行改进,新增特征金字塔层数自动确定功能,进一步提高识别自动化程度。4. The present invention improves the original algorithm, adds the function of automatically determining the number of feature pyramid layers, and further improves the degree of recognition automation.
附图说明Description of drawings
图1为搜索过程示意图;Fig. 1 is a schematic diagram of the search process;
图2为梯度量化示意图;Figure 2 is a schematic diagram of gradient quantization;
图3为梯度传递示意图;Figure 3 is a schematic diagram of gradient transfer;
图4为模板轮廓的映射示意图;Fig. 4 is the mapping schematic diagram of template outline;
图5为变形矫正过程示意图;Figure 5 is a schematic diagram of a deformation correction process;
图6为图像特征金字塔示意图;6 is a schematic diagram of an image feature pyramid;
图7为均值金字塔与最值金字塔效果对比图示意图;Fig. 7 is a schematic diagram of a comparison diagram of the effect of the mean value pyramid and the maximum value pyramid;
图8为最临近点获取示意图;8 is a schematic diagram of the closest point acquisition;
图9识别流程示意图。Figure 9 is a schematic diagram of the identification process.
具体实施方式Detailed ways
具体实施方式一:结合图9说明本实施方式,Embodiment 1: This embodiment is described with reference to FIG. 9 ,
本实施方式所述的基于形状匹配的高铁高度调整杆脱出故障图像识别方法,包括以下步骤:The shape matching-based image recognition method for a high-speed rail height adjustment rod disengagement fault described in this embodiment includes the following steps:
一、线阵图像获取:1. Line array image acquisition:
分别在列车轨道周围搭建高清设备,列车通过设备后,获取高清的列车图像。采用线扫描的方式,可以形成视野广、精度高的二维图像。Build high-definition equipment around the train tracks, and obtain high-definition train images after the train passes through the equipment. The line scanning method can form a two-dimensional image with a wide field of view and high precision.
二、待检测候选区域截取:2. Interception of candidate regions to be detected:
根据列车轴距信息、车型信息对二维图片进行截取,从列车图像中截取包含检测部件(高度调整杆)的局部区域图像作为检测候选区域图像,可有效减少故障识别所需时间、提升识别准确率。According to the train wheelbase information and vehicle type information, the two-dimensional picture is intercepted, and the local area image including the detection component (height adjustment rod) is intercepted from the train image as the detection candidate area image, which can effectively reduce the time required for fault identification and improve the accuracy of identification. Rate.
三、检测部件(高度调整杆)的检测:3. Detection of detection components (height adjustment rod):
整体来说,模板匹配是用检测部件(高度调整杆)的模板图像与搜索图片子区域进行比较,并将搜索图片中与模板最相似的子区域作为最终匹配结果的搜索过程,搜索过程如图1所示。整个过程分为两个阶段:离线阶段与在线阶段。In general, template matching is a search process in which the template image of the detection component (height adjustment rod) is compared with the sub-region of the search image, and the sub-region in the search image that is most similar to the template is used as the final matching result. The search process is shown in the figure. 1 shown. The whole process is divided into two stages: offline stage and online stage.
其中,离线阶段进行待识别物体模板的创建,需要人工设计图像特征,要求模板图像干净整洁,特征明显,轮廓清晰,在一些实施例中可以采用背景灰度和前景灰度差50-100;在线阶段为自动识别阶段,无法进行人为干涉,要求具有实时性。Among them, the creation of the template of the object to be recognized in the offline stage requires manual design of image features, and the template image is required to be clean and tidy, with obvious features and clear outlines. In some embodiments, the difference between the background grayscale and the foreground grayscale can be 50-100; online The stage is the automatic identification stage, and human intervention cannot be carried out, and it is required to be real-time.
基于形状的模板匹配着眼于物体的形状信息,采用边缘点的梯度作为基础数据进行相似性比较,同时定义相似度量函数作为相似程度的评价标准,可以解决光照不均匀变化,对比度变化明显,噪声强烈,存在异物、遮挡等问题,具有较高的鲁棒性;采用边缘点最离散采样与基于图像特征金字塔由粗到精的逐级匹配策略,具有较高的实时性;采用基于最小二乘的位姿精矫方法,具有较高的匹配精度。具体的识别流程及改进如下:Shape-based template matching focuses on the shape information of objects, uses the gradient of edge points as basic data for similarity comparison, and defines a similarity metric function as an evaluation standard for similarity, which can solve uneven illumination changes, obvious contrast changes, and strong noise. , there are problems such as foreign objects and occlusion, and it has high robustness; the most discrete sampling of edge points and the step-by-step matching strategy based on image feature pyramid from coarse to fine have high real-time performance; The pose precision correction method has high matching accuracy. The specific identification process and improvement are as follows:
1、相似度量函数的定义:1. Definition of similarity measure function:
将相似度量函数作为相似性评价标准,基于形状的模板匹配相似度量函数如下:Taking the similarity metric function as the similarity evaluation criterion, the shape-based template matching similarity metric function is as follows:
其中,d‘i为模板图片中点i的梯度,表示d‘i的转置;ei′为搜索图片上被模板覆盖的子区域中i的对应点i′的梯度;n表示点i的总数;(t′i,u′i)及(v,w)分别为d′i与ei′的x、y方向上的梯度分量。Among them, d' i is the gradient of point i in the template image, represents the transposition of d'i; e i' is the gradient of the corresponding point i' of i in the sub-region covered by the template on the search image; n represents the total number of points i; (t' i , u' i ) and (v , w) are the gradient components in the x and y directions of d′ i and e i′ respectively.
2、模板图像的获取:2. Obtaining the template image:
将获取到的高清二维图像进行筛选,选出无异物,无遮挡,轮廓清晰的理想图片作为模板。The obtained high-definition two-dimensional images are screened, and an ideal image with no foreign matter, no occlusion, and clear outline is selected as a template.
3、基本形态学处理:3. Basic morphological processing:
对模板图像进行膨胀、腐蚀、滤波等形态学处理,去除孔洞及噪声影响;将检测部件的待检测图像作为搜索图片,也进行同样的处理。The template image is subjected to morphological processing such as expansion, corrosion, and filtering to remove the influence of holes and noise; the image to be detected of the detection component is used as the search image, and the same processing is also performed.
4、创建特征金字塔:4. Create a feature pyramid:
对模板图像创建图像特征金字塔。图像特征金字塔是对图像进行连续降采样,并从大到小逐层堆砌以得到的塔状结构,如图6所示。图像特征金字塔可以在指数的尺度上降低算法的复杂度,大大提高计算效率。图像特征金字塔具有层数越高分辨率越低,形状信息越模糊;层数越低分辨率越高,形状信息越明显的特征。基于这一特征,要求图像特征金字塔的最高层仍然具有明显的轮廓特征。Create an image feature pyramid on the template image. The image feature pyramid is a tower-like structure obtained by continuously down-sampling the image and stacking it layer by layer from large to small, as shown in Figure 6. The image feature pyramid can reduce the complexity of the algorithm on an exponential scale and greatly improve the computational efficiency. The image feature pyramid has features that the higher the number of layers, the lower the resolution and the blurrier the shape information; the lower the number of layers, the higher the resolution and the more obvious the shape information. Based on this feature, it is required that the highest level of the image feature pyramid still has obvious contour features.
传统方法通过人工输入的方式确定金字塔层数,这种方法存在以下弊端:The traditional method determines the number of pyramid layers by manual input. This method has the following disadvantages:
一方面,对于大小不同形状各异的物体,单一的建塔层数不再适用。比如,对于大物体,5层金字塔比较合适,对于小物体可能只需要3层。如果对小物体建立5层金字塔,那么在金字塔顶层物体基本的轮廓信息可能已经消失;另一方面,由于单一建塔层数的不适用性,需要人工不断调整,这无疑打断了产线的流水化作业,降低了自动化程度。On the one hand, for objects of different sizes and shapes, a single tower building layer is no longer applicable. For example, for large objects, a 5-layer pyramid is suitable, but for small objects, only 3 layers may be needed. If a 5-layer pyramid is built for small objects, the basic outline information of objects on the top layer of the pyramid may have disappeared; on the other hand, due to the inapplicability of a single tower layer, manual adjustment is required, which undoubtedly interrupts the production line. Streamlined operations reduce the degree of automation.
基于上述问题,本发明提出基于顶层特征点个数的金字塔层数自动确定方法。基本流程如下:Based on the above problems, the present invention proposes a method for automatically determining the number of pyramid levels based on the number of top-level feature points. The basic process is as follows:
a、对输入图像进行特征提取,获得特征图;a. Perform feature extraction on the input image to obtain a feature map;
b、设定金字塔初始层数L=0;b. Set the initial number of pyramid layers L=0;
c、对特征图,从L层开始逐层创建图像特征金字塔;c. For the feature map, create an image feature pyramid layer by layer starting from the L layer;
d、根据初始采样率ratio对当前层金字塔图像进行特征采样;d. Perform feature sampling on the current layer pyramid image according to the initial sampling rate ratio;
e、如果边缘点数N大于第一阈值(优选为40)同时小于第二阈值(优选为60),则跳出流程使用当前金字塔层数;e. If the number of edge points N is greater than the first threshold (preferably 40) and smaller than the second threshold (preferably 60), jump out of the process and use the current pyramid level;
f、如果边缘点数N大于第二阈值(优选为60),则L+=1(将L更新为L+1),跳转步骤c;f. If the number of edge points N is greater than the second threshold (preferably 60), then L+=1 (update L to L+1), and jump to step c;
g、如果边缘点数N大于0小于第一阈值(优选为40),则L=0,同时将采样率除1.5,跳转步骤c;g. If the number of edge points N is greater than 0 and less than the first threshold (preferably 40), then L=0, at the same time divide the sampling rate by 1.5, and jump to step c;
h、循环步骤c到步骤g,直到满足步骤e。h. Cycle step c to step g until step e is satisfied.
本发明自动获取得到图像特征金字塔层数,相比现有技术具有以下优点:The present invention automatically obtains the number of image feature pyramid layers, and has the following advantages compared to the prior art:
第一,传统方法是人工设置金字塔层数的,对于尺寸不同的图片设置相同的层数会存在诸多问题。例如,对于小尺寸图片使用大尺寸图片的缩放参数会使得小尺寸图片丢失纹理信息,对大尺寸图片使用小尺寸图片的缩放参数达不到理想的缩放比,不能最大程度进行加速。First, the traditional method is to manually set the number of pyramid layers, and there are many problems in setting the same number of layers for images of different sizes. For example, using the scaling parameters of large-sized images for small-sized images will cause the small-sized images to lose texture information, and using the scaling parameters of small-sized images for large-sized images cannot achieve an ideal scaling ratio and cannot maximize acceleration.
本发明提出的图像特征金字塔层数自动确定方法,是根据特征金字塔每层中特征点的个数来决定是否将当前层作为图像特征金字塔的最高层。而且还进一步提出特征点筛选比例这一参数,虽然复杂度更高一些,但是所得到的金字塔层数及其上的特征点数更为合理。而且在边缘提取及特征点最离散采样的过程中,对当前层的特征点数进行筛选,筛选出能够表征物体形状信息的最离散的N个点(最离散是指离散程度最大),一方面可以减少相似度量的计算量,另一方面去除了冗余的特征点(想要得到一个物体的匹配位置并不需要所有特征点都参与计算)的影响,使用少量但更加精细,更加准确的特征点信息去确定金字塔层数,得到的层数会更加精准。The method for automatically determining the number of image feature pyramid layers proposed by the present invention is to decide whether to use the current layer as the highest layer of the image feature pyramid according to the number of feature points in each layer of the feature pyramid. Moreover, the parameter of the feature point screening ratio is further proposed. Although the complexity is higher, the obtained pyramid layers and the number of feature points on them are more reasonable. Moreover, in the process of edge extraction and the most discrete sampling of feature points, the number of feature points of the current layer is screened, and the most discrete N points that can represent the shape information of the object (the most discrete refers to the largest degree of discreteness) are screened. Reduce the calculation amount of the similarity measure, on the other hand, remove the influence of redundant feature points (to get the matching position of an object does not require all feature points to participate in the calculation), use a small number of but more refined and more accurate feature points Information to determine the number of pyramid levels, the number of levels obtained will be more accurate.
第二,本发明提出的金字塔层数自动确定方法是自比较的,即只参考图像自身的特征信息,不与其他图像进行比较,这样可以将图片独立化,每张图片都保有自身原始的完整的图像纹理信息,所得到的层数信息是非常适用与自身图像特点的。Second, the method for automatically determining the number of pyramid layers proposed by the present invention is self-comparative, that is, only the feature information of the image itself is referred to, and no comparison with other images is performed, so that the pictures can be independent, and each picture retains its own original integrity The obtained image texture information, the obtained layer number information is very suitable for its own image characteristics.
第三,本发明将传统的均值金字塔(相邻四像素取均值作为下一层金字塔的对应点)改变为最大值金字塔(相邻四像素取最值作为下一层金字塔的对应点),如此做可以最大程度的保留形状信息。均值金字塔与最值金字塔效果对比如图7所示,从图中可以明显看出,本发明提出的最值金字塔在第3层和第4层仍然具有清晰的物体轮廓,而传统的均值金字塔在第3层和第4层几乎看不清物体轮廓。Third, the present invention changes the traditional mean value pyramid (the average value of adjacent four pixels is taken as the corresponding point of the next layer of pyramid) into the maximum value pyramid (the most value of adjacent four pixels is taken as the corresponding point of the next layer of pyramid), so do to preserve the shape information to the greatest extent possible. The comparison of the effect of the mean pyramid and the maximum value pyramid is shown in Figure 7. It can be clearly seen from the figure that the maximum value pyramid proposed by the present invention still has clear object outlines on the third and fourth layers, while the traditional mean pyramid is in Layers 3 and 4 can barely see the outline of objects.
5、确定了金字塔层数后,针对于每层图像特征金字塔,分别进行边缘提取并对特征点进行最离散采样,对特征点提取特征点梯度信息;具体过程包括以下步骤:5. After the number of pyramid layers is determined, for each layer of the image feature pyramid, edge extraction is performed and the feature points are most discretely sampled, and feature point gradient information is extracted from the feature points; the specific process includes the following steps:
5.1、采用边缘提取算法,如canny,对图片进行边缘提取。5.1. Use an edge extraction algorithm, such as canny, to extract the edge of the picture.
5.2、对边缘点进行最离散采样,提取出能够表征物体形状信息的N个点,要求提取出的特征点尽可能分散的遍布物体轮廓。最离散特征点筛选可以去除冗余边缘点,减少匹配计算量,提高匹配速度。5.2. Perform the most discrete sampling on the edge points, and extract N points that can represent the shape information of the object. The extracted feature points are required to be scattered throughout the outline of the object as much as possible. The most discrete feature point screening can remove redundant edge points, reduce the amount of matching calculation, and improve the matching speed.
5.3、提取特征点梯度信息用于后续匹配:5.3. Extract feature point gradient information for subsequent matching:
传统方法直接使用边缘点上的梯度信息作为匹配数据。由于列车速度的变化及拍摄角度的不同,不可避免的会出现水平方向的拉伸及竖直方向的变形,导致局部边缘梯度出现混乱,在进行模板的滑窗遍历时,由于物体的形变,无法找到模板边缘点与搜索图像边缘点的对应关系,导致最终的相似度量分值偏低,最终导致漏检。传统的形状匹配无法不再适用。基于此问题,本发明提出基于局部梯度量化及梯度传递的局部变形匹配方法,使问题得到解决。Traditional methods directly use gradient information on edge points as matching data. Due to the change of train speed and the difference of shooting angle, horizontal stretching and vertical deformation will inevitably occur, resulting in confusion of local edge gradients. Finding the correspondence between the edge points of the template and the edge points of the search image results in a low score of the final similarity measure, which eventually leads to missed detection. Traditional shape matching can no longer be applied. Based on this problem, the present invention proposes a local deformation matching method based on local gradient quantization and gradient transfer to solve the problem.
针对于特征点的坐标,将包括当前特征点在内的3邻域内9个点(图3的九宫格就表示3邻域内9个点)进行梯度量化;For the coordinates of the feature points, gradient quantization is performed on 9 points in the 3 neighborhoods including the current feature point (the nine-square grid in Figure 3 represents 9 points in the 3 neighborhoods);
梯度量化是指将梯度方向量化为8个代表方向,分别为11.25°、33.75°、56.25°、78.75°、101.25°、123.75°、146.25°及168.75°,即图2中实线指向的位置;Gradient quantization refers to quantizing the gradient direction into 8 representative directions, namely 11.25°, 33.75°, 56.25°, 78.75°, 101.25°, 123.75°, 146.25° and 168.75°, which are the positions pointed by the solid line in Figure 2;
针对于当前特征点,将其坐标周围3邻域内9个点的梯度方向向8个量化方向进行规整,如果当前点的梯度方向落在0°到22.5°范围内,则使用11.25°作为代表;如果当前点的梯度方向落在22.5°到45°范围内,则使用33.75°作为代表;如果梯度方向落在45°到67.5°范围内,则使用56.25°作为代表;如果当前点的梯度方向落在67.5°到90°范围内,则使用78.75°作为代表;如果当前点的梯度方向落在67.5°到90°范围内,以22.5°为一个单位,对90°到180°的范围,采用8个代表方向中的具体值进行规整;具体量化方式如图2所示。For the current feature point, adjust the gradient directions of 9 points in 3 neighborhoods around its coordinates to 8 quantization directions. If the gradient direction of the current point falls within the range of 0° to 22.5°, use 11.25° as a representative; If the gradient direction of the current point falls within the range of 22.5° to 45°, use 33.75° as the representative; if the gradient direction of the current point falls within the range of 45° to 67.5°, use 56.25° as the representative; if the gradient direction of the current point falls In the range of 67.5° to 90°, use 78.75° as a representative; if the gradient direction of the current point falls within the range of 67.5° to 90°, take 22.5° as a unit, and for the range of 90° to 180°, use 8 The specific values in each representative direction are normalized; the specific quantification method is shown in Figure 2.
针对于当前特征点,进行梯度传递:For the current feature point, gradient transfer is performed:
梯度传递是将9个邻域点(图3中的九宫格)的梯度方向向中心点汇合,并取汇合后的平均方向作为最终的梯度方向,具体传递方式见图3。Gradient transfer is to merge the gradient directions of 9 neighboring points (the nine-square grid in Figure 3) to the center point, and take the average direction after the convergence as the final gradient direction. The specific transfer method is shown in Figure 3.
通过梯度量化及梯度传递,可以将局部范围内的梯度用一个主梯度代表,消除由于局部变形造成的梯度方向混乱产生的影响(降低相似度量值),从而使得后续匹配过程具有良好匹配效果。Through gradient quantization and gradient transfer, the gradient in the local range can be represented by a main gradient, which eliminates the influence of the gradient direction confusion caused by local deformation (reduces the similarity measure), so that the subsequent matching process has a good matching effect.
在梯度量化及传递过程中,除了记录主梯度外,还记录每一个原始真实梯度,记做分量梯度;分量梯度用于后续步骤确定搜索物体上的边缘点的切线;In the process of gradient quantization and transfer, in addition to recording the main gradient, each original real gradient is also recorded, which is recorded as the component gradient; the component gradient is used in the subsequent steps to determine the tangent of the edge point on the search object;
在完成粗定位操作后,可以根据仿射变换操作将模板轮廓映射到搜索图片上,此时可以根据量化梯度将模板轮廓向实际搜索物体轮廓进行变形矫正,最终实现变形匹配,具体过程如图4及图5所示。After the rough positioning operation is completed, the template contour can be mapped to the search image according to the affine transformation operation. At this time, the template contour can be deformed and corrected to the actual search object contour according to the quantization gradient, and finally the deformation matching can be realized. The specific process is shown in Figure 4 and shown in Figure 5.
6、旋转特征建模:6. Rotation feature modeling:
在每层图像特征金字塔上,对提取到的最离散边缘点进行旋转,解决旋转物体的匹配问题。旋转步长设置为底层0.5°,随着层数增加逐层乘2,超过8°则保持8°不变。如果超过8°,某些实例将会由于旋转过大而丢失,影响最终的匹配稳定性。On each layer of image feature pyramid, the most discrete edge points extracted are rotated to solve the matching problem of rotating objects. The rotation step size is set to 0.5° for the bottom layer, and it is multiplied by 2 as the number of layers increases. If it exceeds 8°, it remains unchanged at 8°. If it exceeds 8°, some instances will be lost due to excessive rotation, affecting the final matching stability.
7、基于图像特征金字塔的由粗到精的逐级搜索策略:7. Coarse-to-fine step-by-step search strategy based on image feature pyramid:
此阶段属于在线自动识别阶段。This stage belongs to the online automatic identification stage.
首先对搜索图片建立特征金字塔。First, build a feature pyramid for the search image.
取金字塔最高层的模板图像在搜索图片金字塔最高层进行全角度的滑窗遍历。将相似度最高的作为匹配结果(x,y,θ)。将此结果向下一层金字塔映射,也就是将坐标乘2,即(2x,2y,θ)。考虑到高层信息的不稳定性,将下一层的搜索区域定位于映射坐标(2x,2y,θ)周围的范围内,即在下一层的搜索区域中(2x,2y,θ)扩大一圈作为搜索区域范围,然后在该区域范围内继续搜索,并取区域范围内结果的极大值作为当前层的匹配结果继续向下层映射;循环此过程,直到图像特征金字塔的第一层,即图像原始分辨率层,完成粗定位。Take the template image of the highest level of the pyramid and perform a full-angle sliding window traversal at the highest level of the search image pyramid. The highest similarity is used as the matching result (x, y, θ). Map this result to the next level of the pyramid, that is, multiply the coordinates by 2, ie (2x, 2y, θ). Considering the instability of high-level information, the search area of the next layer is located in the range around the mapping coordinates (2x, 2y, θ), that is, the search area of the next layer (2x, 2y, θ) is expanded by a circle As the search area range, then continue searching within the area range, and take the maximum value of the results in the area range as the matching result of the current layer and continue to map to the next layer; this process is repeated until the first layer of the image feature pyramid, that is, the image The original resolution layer, complete the coarse positioning.
将下一层的搜索区域定位于映射坐标(2x,2y,θ)周围的范围内的过程可以通过以下实施例进行说明:The process of locating the search area of the next layer in the range around the mapping coordinates (2x, 2y, θ) can be illustrated by the following embodiments:
在金字塔高层(分辨率低的层)进行全遍历搜索,如果大小是512x512,则需要滑动模板512x512个位置,得到结果(x,y,θ),然后将这个结果向下一层映射,得到(2x,2y,θ),称为锚点,此时当前层图片的大小为(2048,2048),这时的搜索范围可以定在以锚点为中心的3x3范围,考虑到粗定位的不准确性,这里做一下增大,即(2x±deta_x,2y±deta_y,θ),如果deta为1,则模板需要遍历的位置只有5x5,相比2048x2048有非常大的缩小。Perform a full traversal search at the top layer of the pyramid (the layer with low resolution). If the size is 512x512, you need to slide the template 512x512 positions to get the result (x, y, θ), and then map the result to the next layer to get ( 2x, 2y, θ), called the anchor point, at this time the size of the current layer picture is (2048, 2048), the search range at this time can be set in the 3x3 range centered on the anchor point, considering the inaccuracy of coarse positioning If deta is 1, the template needs to traverse only 5x5, which is a very large reduction compared to 2048x2048.
从图4中可以看出,传统的匹配方法,即无形变匹配,最终得到的结果是一个点坐标(r,c)和旋转角度θ,通过仿射变换可以将模板轮廓映射到搜索图片上的目标位置。完成映射后特征点和特征边的对应关系已经基本确认。As can be seen from Figure 4, the traditional matching method, namely deformation-free matching, the final result is a point coordinate (r, c) and a rotation angle θ. The template contour can be mapped to the search image through affine transformation. target location. After the mapping is completed, the correspondence between feature points and feature edges has been basically confirmed.
8、进行变形矫正:8. Perform deformation correction:
变形矫正过程见图5,从图5中可以看出,模板图像轮廓通过仿射变换已经映射到搜索图片上,但是由于存在局部变形,变形区内的特征点梯度方向存在混乱无法对应,见图5中分量梯度1-分量梯度6。通过梯度传递可以将量化梯度规整到为主梯度,见图5中主梯度1和主梯度2。使用主梯度1和主梯度2进行匹配,可以确定对应点P及对应点A:The deformation correction process is shown in Figure 5. It can be seen from Figure 5 that the template image contour has been mapped to the search image through affine transformation, but due to the existence of local deformation, the gradient direction of the feature points in the deformation area is confused and cannot be corresponded, as shown in Figure 5 5 in Component Gradient 1 - Component Gradient 6. The quantized gradient can be normalized to the main gradient by gradient transfer, see
将模板图像轮廓点经过金字塔粗定位的结果进行仿射变换到搜索图片上对应的点记作P,对P点的主梯度与搜索图片边缘点主梯度进行相似性计算,将相似性最高的搜索图片上的点作为边缘点A;再将P替换为A,从而将原来的模板轮廓(图5中的原始边线1)转变为矫正轮廓线(图5中矫正边线1)。Perform affine transformation of the contour points of the template image through the rough positioning of the pyramid to the corresponding points on the search image, denoted as P, and calculate the similarity between the main gradient of point P and the main gradient of the edge points of the search image, and search for the highest similarity. The point on the picture is used as the edge point A; then P is replaced with A, so as to convert the original template outline (
针对于其他边缘点进行矫正(移动变形区窗口,对其他变形轮廓进行矫正),最终达到将模板轮廓矫正与实际轮廓重合,完成变形矫正匹配。Correcting other edge points (moving the deformation area window, correcting other deformed contours), finally achieves the template contour correction coincides with the actual contour, and completes the deformation correction matching.
一般进行6-7次迭代即可完成矫正,使矫正后的模板轮廓与实际物体轮廓基本重合。Generally, the correction can be completed after 6-7 iterations, so that the corrected template outline basically coincides with the actual object outline.
9、基于最小二乘的位姿精矫:9. Pose fine correction based on least squares:
经过变形矫正后的结果,这个结果与真实结果之间仍存在微小偏差,需要进行矫正。本发明采用最小二乘法进行矫正,可以得到更高的精度。After deformation correction, there is still a slight deviation between this result and the real result, which needs to be corrected. The present invention adopts the least square method for correction, which can obtain higher precision.
矫正以特征点到特征线的距离最短作为优化目标进行迭代;其中特征点为模板图像边缘点经过变形矫正后的得到的位置点,即模板图像的边缘点P;特征线为在搜索图像上距离点P最近的搜索物体上的临近边缘点A或B对应的切线;The correction takes the shortest distance from the feature point to the feature line as the optimization goal to iterate; the feature point is the position point obtained after the edge point of the template image is deformed and corrected, that is, the edge point P of the template image; the feature line is the distance on the search image. The tangent corresponding to the adjacent edge point A or B on the nearest search object of point P;
点P的最临近边缘点A或B的获取有两种方法,见图8:There are two ways to obtain the nearest edge point A or B of point P, see Figure 8:
方法一:以变换后的模板图像边缘点P为中心画矩形,遍历矩形范围内所有搜索图像边缘点,分别计算每个边缘点与点P的距离,取距离最小的点为最临近边缘点A。Method 1: Draw a rectangle with the transformed template image edge point P as the center, traverse all search image edge points within the rectangle, calculate the distance between each edge point and point P, and take the point with the smallest distance as the closest edge point A .
方法二:变形矫正后,变换后的模板边缘与搜索图片边缘的对应关系已经确认。所以,以变换后的模板图像边缘点P为起点,将该点的梯度所在直线与搜索图片边缘的交点作为最临近边缘点B。Method 2: After the deformation is corrected, the correspondence between the transformed template edge and the search image edge has been confirmed. Therefore, taking the transformed template image edge point P as the starting point, the intersection of the straight line where the gradient of this point is located and the edge of the search image is taken as the nearest edge point B.
10、基于模板图像和搜索结果,通过逻辑分析对精细定位的部件图像进行故障判定;10. Based on the template image and search results, the fault determination is performed on the finely positioned component images through logical analysis;
具体实施方式一是针对于高铁高度调整杆脱出故障图像进行识别的,实际上,上述过程可以用于高铁或者列车的其他部件图像进行故障识别的,可以仅仅对一些细节进行调整即可,例如:在步骤e、步骤f、步骤g等中的优选值都是针对于高铁高度调整杆的限定,此时高铁高度调整杆的识别过程中的金字塔层数对与识别效果有非常良好的作用。针对于其他部件图像的故障识别,按照本发明的方案进行调整即可。The first is to identify the fault image of the height adjustment rod of the high-speed rail. In fact, the above process can be used for fault identification of the image of other parts of the high-speed rail or train, and only some details can be adjusted, for example: The preferred values in step e, step f, step g, etc. are all for the limitation of the high-speed rail height adjustment rod. At this time, the number of pyramid layers in the identification process of the high-speed rail height adjustment rod has a very good effect on the recognition effect. For the fault identification of the images of other components, adjustment can be made according to the solution of the present invention.
具体实施方式仅仅是对本发明技术方案的解释和说明,不能以此限定权利保护范围。凡根据本发明权利要求书和说明书所做的仅仅是局部改变的,仍应落入本发明的保护范围内。The specific embodiment is only an explanation and description of the technical solution of the present invention, and cannot be used to limit the protection scope of the right. Any changes made according to the claims and description of the present invention are only partial changes, which should still fall within the protection scope of the present invention.
具体实施方式二:Specific implementation two:
本实施方式所述的基于形状匹配的高铁高度调整杆脱出故障图像识别方法,步骤10所述的通过逻辑分析对精细定位的部件图像进行故障判定的过程包括以下步骤:In the shape matching-based method for identifying a fault image of a height adjustment rod of a high-speed rail falling out, the process of performing fault determination on a finely positioned component image through logical analysis described in step 10 includes the following steps:
1)根据轴距等先验信息,得到子图(包含部件的小图);1) According to the prior information such as the wheelbase, the sub-graph (including the small graph of the component) is obtained;
2)分别对高度调整杆及调整杆安装底座方块进行匹配;2) Match the height adjustment rod and the adjustment rod mounting base block respectively;
3)计算调整杆下边缘坐标(x1,y1)及安装座方块下边坐标(x2,y2),及安装做高度height;3) Calculate the coordinates of the lower edge of the adjustment rod (x1, y1) and the coordinates of the lower side of the mounting block (x2, y2), and the installation height;
4)计算比例ratio=(y2-y1)/height;4) Calculate the ratio ratio=(y2-y1)/height;
5)如果ratio>0.3则判定为故障。5) If ratio>0.3, it is judged as failure.
其他步骤和参数与具体实施方式一相同。Other steps and parameters are the same as in the first embodiment.
需要注意的是,具体实施方式仅仅是对本发明技术方案的解释和说明,不能以此限定权利保护范围。凡根据本发明权利要求书和说明书所做的仅仅是局部改变的,仍应落入本发明的保护范围内。It should be noted that the specific embodiments are only explanations and descriptions of the technical solutions of the present invention, and cannot be used to limit the protection scope of the rights. Any changes made according to the claims and description of the present invention are only partial changes, which should still fall within the protection scope of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010674818.7A CN111860501B (en) | 2020-07-14 | 2020-07-14 | High-speed rail height adjusting rod falling-out fault image identification method based on shape matching |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010674818.7A CN111860501B (en) | 2020-07-14 | 2020-07-14 | High-speed rail height adjusting rod falling-out fault image identification method based on shape matching |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111860501A true CN111860501A (en) | 2020-10-30 |
| CN111860501B CN111860501B (en) | 2021-02-05 |
Family
ID=72983534
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010674818.7A Active CN111860501B (en) | 2020-07-14 | 2020-07-14 | High-speed rail height adjusting rod falling-out fault image identification method based on shape matching |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111860501B (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112699794A (en) * | 2020-12-29 | 2021-04-23 | 哈尔滨市科佳通用机电股份有限公司 | Method for identifying dislocation fault images of middle rubber and upper and lower floor plates of wagon axle box rubber pad |
| CN112950566A (en) * | 2021-02-25 | 2021-06-11 | 哈尔滨市科佳通用机电股份有限公司 | Windshield damage fault detection method |
| CN113378886A (en) * | 2021-05-14 | 2021-09-10 | 珞石(山东)智能科技有限公司 | Method for automatically training shape matching model |
| CN114067148A (en) * | 2021-11-15 | 2022-02-18 | 江苏集萃智能光电系统研究所有限公司 | Image-to-object space corresponding matching method based on railway train fault detection |
| CN114928720A (en) * | 2022-05-13 | 2022-08-19 | 重庆云凯科技有限公司 | System and method for detecting state of parking barrier gate rod |
| CN115661106A (en) * | 2022-10-31 | 2023-01-31 | 北京无线电测量研究所 | Equipment fault position identification method and system |
Citations (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP0817495A2 (en) * | 1996-07-05 | 1998-01-07 | Canon Kabushiki Kaisha | Image subject extraction apparatus and method |
| CN102129691A (en) * | 2011-03-22 | 2011-07-20 | 北京航空航天大学 | Video object tracking cutting method using Snake profile model |
| US20120261135A1 (en) * | 2011-04-15 | 2012-10-18 | Nowak Ethan J | Shape-Based Metrics In Reservoir Characterization |
| CN104318582A (en) * | 2014-11-14 | 2015-01-28 | 西南交通大学 | Detection method for bad state of rotating double-lug component pin of high-speed rail contact network on basis of image invariance target positioning |
| CN104408477A (en) * | 2014-12-18 | 2015-03-11 | 成都铁安科技有限责任公司 | Key part fault detection method and device |
| CN105184824A (en) * | 2015-09-30 | 2015-12-23 | 重庆师范大学 | Intelligent agricultural bird repelling system and method based on image sensing network |
| CN105260744A (en) * | 2015-10-08 | 2016-01-20 | 北京航空航天大学 | Automatic on-line diagnosis method for freight train coupler tail cotter position faults and system |
| CN105930858A (en) * | 2016-04-06 | 2016-09-07 | 吴晓军 | Fast high-precision geometric template matching method enabling rotation and scaling functions |
| CN107671896A (en) * | 2017-05-19 | 2018-02-09 | 重庆誉鸣科技有限公司 | Fast vision localization method and system based on SCARA robots |
| CN108319979A (en) * | 2018-02-05 | 2018-07-24 | 哈工大机器人(合肥)国际创新研究院 | A kind of framing recognition detection method based on scaling and rotation matching |
| CN109801318A (en) * | 2019-01-30 | 2019-05-24 | 东北大学 | A kind of quick object matches algorithm |
| CN109993800A (en) * | 2019-03-18 | 2019-07-09 | 五邑大学 | A detection method, device and storage medium for workpiece size |
| US20190257556A1 (en) * | 2016-07-18 | 2019-08-22 | Les Entreprises Zeronext Inc. | Wall-mounted refrigerator and peltier effect cooling system |
| CN110728326A (en) * | 2019-10-15 | 2020-01-24 | 易思维(杭州)科技有限公司 | Edge template matching method with rotation |
-
2020
- 2020-07-14 CN CN202010674818.7A patent/CN111860501B/en active Active
Patent Citations (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP0817495A2 (en) * | 1996-07-05 | 1998-01-07 | Canon Kabushiki Kaisha | Image subject extraction apparatus and method |
| CN102129691A (en) * | 2011-03-22 | 2011-07-20 | 北京航空航天大学 | Video object tracking cutting method using Snake profile model |
| US20120261135A1 (en) * | 2011-04-15 | 2012-10-18 | Nowak Ethan J | Shape-Based Metrics In Reservoir Characterization |
| CN104318582A (en) * | 2014-11-14 | 2015-01-28 | 西南交通大学 | Detection method for bad state of rotating double-lug component pin of high-speed rail contact network on basis of image invariance target positioning |
| CN104408477A (en) * | 2014-12-18 | 2015-03-11 | 成都铁安科技有限责任公司 | Key part fault detection method and device |
| CN105184824A (en) * | 2015-09-30 | 2015-12-23 | 重庆师范大学 | Intelligent agricultural bird repelling system and method based on image sensing network |
| CN105260744A (en) * | 2015-10-08 | 2016-01-20 | 北京航空航天大学 | Automatic on-line diagnosis method for freight train coupler tail cotter position faults and system |
| CN105930858A (en) * | 2016-04-06 | 2016-09-07 | 吴晓军 | Fast high-precision geometric template matching method enabling rotation and scaling functions |
| US20190257556A1 (en) * | 2016-07-18 | 2019-08-22 | Les Entreprises Zeronext Inc. | Wall-mounted refrigerator and peltier effect cooling system |
| CN107671896A (en) * | 2017-05-19 | 2018-02-09 | 重庆誉鸣科技有限公司 | Fast vision localization method and system based on SCARA robots |
| CN108319979A (en) * | 2018-02-05 | 2018-07-24 | 哈工大机器人(合肥)国际创新研究院 | A kind of framing recognition detection method based on scaling and rotation matching |
| CN109801318A (en) * | 2019-01-30 | 2019-05-24 | 东北大学 | A kind of quick object matches algorithm |
| CN109993800A (en) * | 2019-03-18 | 2019-07-09 | 五邑大学 | A detection method, device and storage medium for workpiece size |
| CN110728326A (en) * | 2019-10-15 | 2020-01-24 | 易思维(杭州)科技有限公司 | Edge template matching method with rotation |
Non-Patent Citations (5)
| Title |
|---|
| ANISH ACHARYA等: "Template Matching based Object Detection Using HOG Feature Pyramid", 《COMPUTER VISION AND PATTERN RECOGNITION》 * |
| 吴孟桦等: "基于图像配准的零件轮廓修正方法", 《计算机应用》 * |
| 吴晓军等: "基于边缘几何特征的高性能模板匹配算法", 《仪器仪表学报》 * |
| 陈治杉等: "基于机器视觉的晶圆表面缺陷检测", 《贵州大学学报(自然科学版)》 * |
| 陈泽宁: "基于模板匹配工件定位的研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112699794A (en) * | 2020-12-29 | 2021-04-23 | 哈尔滨市科佳通用机电股份有限公司 | Method for identifying dislocation fault images of middle rubber and upper and lower floor plates of wagon axle box rubber pad |
| CN112950566A (en) * | 2021-02-25 | 2021-06-11 | 哈尔滨市科佳通用机电股份有限公司 | Windshield damage fault detection method |
| CN113378886A (en) * | 2021-05-14 | 2021-09-10 | 珞石(山东)智能科技有限公司 | Method for automatically training shape matching model |
| CN114067148A (en) * | 2021-11-15 | 2022-02-18 | 江苏集萃智能光电系统研究所有限公司 | Image-to-object space corresponding matching method based on railway train fault detection |
| CN114067148B (en) * | 2021-11-15 | 2024-07-05 | 江苏集萃智能光电系统研究所有限公司 | Image-to-real object space corresponding matching method based on railway train fault detection |
| CN114928720A (en) * | 2022-05-13 | 2022-08-19 | 重庆云凯科技有限公司 | System and method for detecting state of parking barrier gate rod |
| CN115661106A (en) * | 2022-10-31 | 2023-01-31 | 北京无线电测量研究所 | Equipment fault position identification method and system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111860501B (en) | 2021-02-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111243032B (en) | A fully automatic checkerboard corner detection method | |
| CN111860501A (en) | Image recognition method of high-speed rail height adjustment rod falling out fault based on shape matching | |
| CN109615611B (en) | Inspection image-based insulator self-explosion defect detection method | |
| CN109255776B (en) | An automatic identification method for cotter pin defects in transmission lines | |
| CN110097536B (en) | Hexagonal bolt looseness detection method based on deep learning and Hough transform | |
| CN107093205B (en) | A kind of three-dimensional space building window detection method for reconstructing based on unmanned plane image | |
| CN109859226B (en) | Detection method of checkerboard corner sub-pixels for graph segmentation | |
| CN108122256B (en) | A method of it approaches under state and rotates object pose measurement | |
| CN105335973B (en) | Apply to the visual processing method of strip machining production line | |
| CN107133973B (en) | A ship detection method in a bridge anti-collision system | |
| CN109858455B (en) | A Block Detection Scale Adaptive Tracking Method for Circular Targets | |
| CN112233116B (en) | Concave-convex mark visual detection method based on neighborhood decision and gray level co-occurrence matrix description | |
| CN101114337A (en) | A method for identifying and locating buildings on the ground | |
| CN111126381A (en) | A method for insulator tilt location and identification based on R-DFPN algorithm | |
| CN111931555B (en) | Method for identifying whether ship AIS is opened or not by utilizing video image | |
| CN111402330A (en) | Laser line key point extraction method based on plane target | |
| CN112418210B (en) | Intelligent classification method for tower inspection information | |
| CN118135214A (en) | Extraction and accuracy verification method of 3D point cloud feature data of container ship cargo hold | |
| CN114998437A (en) | A method for centroid location of space target | |
| CN111340765B (en) | A thermal infrared image reflection detection method based on background separation | |
| CN113989308A (en) | Polygonal target segmentation method based on Hough transform and template matching | |
| CN119904491A (en) | A 3D point cloud registration method based on image pre-registration and multi-criteria mismatch suppression | |
| CN108492306A (en) | A kind of X-type Angular Point Extracting Method based on image outline | |
| CN119169393A (en) | NES-Photovoltaic Module Big Data AI Analysis and Diagnosis System | |
| CN118537289A (en) | Parachute canopy sewing quality detection method and system based on rotating frame detection |
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 |