[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN109344766A - Identification method of slider-type circuit breaker based on inspection robot - Google Patents

Identification method of slider-type circuit breaker based on inspection robot Download PDF

Info

Publication number
CN109344766A
CN109344766A CN201811148601.1A CN201811148601A CN109344766A CN 109344766 A CN109344766 A CN 109344766A CN 201811148601 A CN201811148601 A CN 201811148601A CN 109344766 A CN109344766 A CN 109344766A
Authority
CN
China
Prior art keywords
image
circuit breaker
type circuit
target
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811148601.1A
Other languages
Chinese (zh)
Inventor
郭健
王艳琴
王天野
李胜
吴益飞
袁佳泉
施佳伟
朱禹璇
危海明
黄紫霄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Science and Technology
Original Assignee
Nanjing University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University of Science and Technology filed Critical Nanjing University of Science and Technology
Priority to CN201811148601.1A priority Critical patent/CN109344766A/en
Publication of CN109344766A publication Critical patent/CN109344766A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (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)
  • Image Analysis (AREA)

Abstract

The slide block type breaker recognition methods based on crusing robot that the invention proposes a kind of.The present invention is broadly divided into 5 steps: (1) utilizing picture number collection training SVM multi-categorizer;(2) crusing robot reaches specified inspection point and obtains picture to be detected;(3) coarse positioning and accurate positioning are carried out to target area, screening object candidate area obtains slide block type breaker;(4) to slide block type breaker progress image preprocessing is got, connection maximum two regions of area are extracted;(5) the HOG feature of two connected regions is extracted respectively, and is sent to SVM multi-categorizer and is obtained final recognition result.The present invention utilizes machine learning, and slide block type breaker detection identification mission can be efficiently accomplished under the conditions of different illumination, posture, the gentle accuracy rate of Automated water of image recognition under complex environment is improved, reduces missing inspection, erroneous detection problem to greatest extent.

Description

基于巡检机器人的滑块式断路器识别方法Identification method of slider-type circuit breaker based on inspection robot

技术领域technical field

本发明涉及到目标检测技术,具体而言涉及基于巡检机器人的滑块式断路器识别方法。The invention relates to a target detection technology, in particular to a method for identifying a slider-type circuit breaker based on an inspection robot.

背景技术Background technique

电力行业与人们的生活息息相关,变电站的滑块式断路器是电力行业最基本的器件,它对电力供应至关重要。近年来,滑块式断路器检测与识别不到位从而导致不能正常输送电的现象时有发生,给人民生活、工业生产造成了巨大的经济损失。The power industry is closely related to people's lives. The slider-type circuit breaker in the substation is the most basic device in the power industry, and it is very important to the power supply. In recent years, the lack of detection and identification of the slider-type circuit breaker has resulted in the failure of normal transmission of electricity, which has caused huge economic losses to people's lives and industrial production.

目前关于断路器检测方法主要由两类,第一种是人工巡视检测方法。但由于变电站的断路器大多存在于野外,工作人员一般距离较远,出现问题时一般不能及时解决,从而导致电力供电系统不能及时响应。且人工巡视检测往往需要消耗大量的人力和时间,在长时间、高强度的工作环境下容易出错。因此人工巡视检测方法具有劳动强度大、效率低、巡视检测不到位、可靠性差、风险大等缺点。近年来,随着巡检机器人的推广,滑块式断路器的检测工作逐渐向智能化方向发展。利用电力巡检机器人代替人工巡检具有高效率、高可靠性等优点。但目前大多数方法,利用传统的图像处理手段进行检测和识别,在光照条件变化的情况下,检测效果不好,一般一种光照条件就需要一组参数,这就需要提出一种较为通用的检测和识别方法,应对不同光照、姿态条件下的检测任务。At present, there are two main types of circuit breaker detection methods. The first is the manual inspection method. However, because most of the circuit breakers in substations exist in the wild, the staff are generally far away, and when problems occur, they cannot be solved in time, resulting in the failure of the power supply system to respond in time. In addition, manual inspection and inspection often consume a lot of manpower and time, and are prone to errors in a long-term, high-intensity working environment. Therefore, the manual inspection detection method has the disadvantages of high labor intensity, low efficiency, insufficient inspection inspection, poor reliability, and high risk. In recent years, with the promotion of inspection robots, the detection work of slider-type circuit breakers has gradually developed towards an intelligent direction. Using electric inspection robots to replace manual inspection has the advantages of high efficiency and high reliability. However, most of the current methods use traditional image processing methods for detection and recognition. In the case of changing lighting conditions, the detection effect is not good. Generally, a set of parameters is required for one lighting condition, which requires a more general method. Detection and recognition methods to deal with detection tasks under different lighting and attitude conditions.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于提出了一种基于巡检机器人的滑块式断路器识别方法,解决现有滑块式断路器检测与识别技术中存在的机器人位置不定时,目标尺度、角度变化大,目标受光照影响大从而导致检测识别不准确的问题。The purpose of the present invention is to propose a method for identifying a slider-type circuit breaker based on an inspection robot, so as to solve the problems in the existing slider-type circuit breaker detection and identification technology that the robot's position is not timed, the target scale and angle change greatly, and the target It is greatly affected by light, which leads to the problem of inaccurate detection and recognition.

实现本发明的技术解决方案为:一种基于巡检机器人的滑块式断路器识别方法,具体步骤为:The technical solution for realizing the present invention is: a method for identifying a sliding block circuit breaker based on an inspection robot, and the specific steps are:

步骤1、为每个巡检点选取一张在该巡检点拍摄的断路器居中的图像作为模板图像,利用提前采集的滑块式断路器图像数集训练SVM多分类器;Step 1. For each inspection point, select an image in the center of the circuit breaker taken at the inspection point as a template image, and use the slider-type circuit breaker image number set collected in advance to train the SVM multi-classifier;

步骤2、巡检机器人通过定位导航到达指定巡检点,获取现场滑块式断路器图像并以灰度图的形式读入,用于滑块式断路器检测识别;Step 2. The inspection robot reaches the designated inspection point through positioning and navigation, obtains the image of the on-site slider-type circuit breaker and reads it in the form of a grayscale image, which is used for the detection and identification of the slider-type circuit breaker;

步骤3、对待检测的目标区域进行粗定位和精确定位,筛选目标候选区域得到滑块式断路器图像;Step 3. Perform coarse positioning and precise positioning on the target area to be detected, and filter the target candidate area to obtain the slider-type circuit breaker image;

步骤4、对获取到的现场滑块式断路器图像进行预处理,提取出连通面积最大的两个区域,按照位置分为左右两个部分;Step 4. Preprocess the acquired image of the on-site slider-type circuit breaker, extract the two areas with the largest connected area, and divide them into left and right parts according to their positions;

步骤5、对两个分离出的区域分别进行像素调整,以长m像素,宽n像素的滑动窗口在图像上滑动,对窗口提取HOG特征,将计算得到的HOG特征算子送入SVM多分类器得到最终的识别结果。Step 5. Perform pixel adjustment on the two separated areas respectively, slide on the image with a sliding window with a length of m pixels and a width of n pixels, extract the HOG feature from the window, and send the calculated HOG feature operator to the SVM multi-classification get the final recognition result.

优选地,步骤1中训练SVM多分类器的具体方法为:Preferably, the specific method for training the SVM multi-classifier in step 1 is:

步骤1-1、提前采集滑块式断路器图像数集作为正负训练样本集合;Step 1-1. Collect the slider-type circuit breaker image set in advance as a set of positive and negative training samples;

步骤1-2、提取正负训练样本集合的HOG特征;Step 1-2, extract the HOG features of the positive and negative training sample sets;

步骤1-3、给所有正负训练样本集合赋予样本标签,将训练样本集合的HOG特征以及样本标签送入SVM中进行训练。Steps 1-3: Assign sample labels to all positive and negative training sample sets, and send the HOG features and sample labels of the training sample set to the SVM for training.

优选地,步骤1-1中准备训练样本集合的具体方法为:Preferably, the specific method for preparing the training sample set in step 1-1 is:

(1)采集滑块式断路器的图片,将处于储能状态的图片作为正样本集,处于未储能状态的图片作为负样本集;(1) Collect the pictures of the slider-type circuit breaker, take the pictures in the energy storage state as the positive sample set, and take the pictures in the non-energy storage state as the negative sample set;

(2)裁剪图片,删除滑块式断路器上滑块显示窗口区域之外的多余信息;(2) Crop the picture and delete the redundant information outside the slider display window area on the slider-type circuit breaker;

(3)将图片缩放为长m像素,宽n像素。(3) Scale the image to be m pixels long and n pixels wide.

优选地,步骤1-2中提取正负训练样本集合HOG特征的具体方法为:Preferably, the specific method for extracting the HOG feature of the positive and negative training sample set in step 1-2 is:

(1)将彩色图像转化为灰度图像;(1) Convert the color image to a grayscale image;

(2)对灰度图像进行Gamma矫正,减少图像局部的阴影和光照变化,Gamma矫正的公式为:(2) Gamma correction is performed on the grayscale image to reduce local shadow and illumination changes in the image. The formula for Gamma correction is:

I(x,y)=I(x,y)gamma (1)I(x,y)=I(x,y) gamma (1)

其中,I(x,y)表示图像第x行第y列的像素值,gamma取0-1之间的数;Among them, I(x,y) represents the pixel value of the xth row and the yth column of the image, and gamma takes a number between 0-1;

(3)根据下式计算图像每个像素的梯度:(3) Calculate the gradient of each pixel of the image according to the following formula:

Gx(x,y)=H(x+1,y)-H(x-1,y) (2)G x (x,y)=H(x+1,y)-H(x-1,y) (2)

Gy(x,y)=H(x,y+1)-H(x,y-1) (3)G y (x,y)=H(x,y+1)-H(x,y-1) (3)

其中,Gx(x,y),Gy(x,y),H(x,y)分别表示图像中像素点(x,y)处的水平方向梯度,垂直方向梯度和像素值,像素点(x,y)处的梯度幅值G(x,y)与梯度方向α(x,y)则可根据下式得到:Among them, G x (x, y), G y (x, y), H (x, y) represent the horizontal gradient, vertical gradient and pixel value at the pixel point (x, y) in the image, respectively. The gradient magnitude G(x,y) at (x,y) and the gradient direction α(x,y) can be obtained according to the following formula:

(4)将图像分割为一个个边长为a像素的正方形单元格,a为m和n的最大公因数,为每个单元格创建梯度方向直方图,将梯度方向360度划分为k个方向块,第i个方向块的方向范围为统计单元格内各个像素的梯度方向,如果梯度方向属于某个方向块,则对应方向块的计数值加上这个梯度对应的幅值;(4) Divide the image into square cells with a side length of a pixels, a is the greatest common factor of m and n, create a gradient direction histogram for each cell, and divide the gradient direction 360 degrees into k directions block, the direction range of the ith direction block is Count the gradient direction of each pixel in the cell. If the gradient direction belongs to a certain direction block, the count value of the corresponding direction block is added to the amplitude corresponding to this gradient;

(5)将单元格组合成块,块内归一化梯度直方图将每个单元格对应的梯度直方图改写为向量形式,将每个块内的所有梯度向量串联起来,形成这个块的梯度方向直方图向量;将向量乘上对应的归一化因子,归一化因子的计算公式为:(5) Combine the cells into blocks, and the normalized gradient histogram in the block rewrites the gradient histogram corresponding to each cell into a vector form, and concatenates all the gradient vectors in each block to form the gradient of the block Direction histogram vector; multiply the vector by the corresponding normalization factor, the calculation formula of the normalization factor is:

其中,v表示还未归一化的向量,||v||2表示v的2阶范数,e表示常数;Among them, v represents a vector that has not been normalized, ||v|| 2 represents the second-order norm of v, and e represents a constant;

(6)将图像中所有块的归一化后的向量串联起来得到训练样本集合HOG特征。(6) Concatenate the normalized vectors of all blocks in the image to obtain the HOG feature of the training sample set.

优选地,步骤1-3中将正负训练样本集合的HOG特征以及样本标签送入SVM中训练的具体方法为:Preferably, in steps 1-3, the specific method for sending the HOG features and sample labels of the positive and negative training sample sets into the SVM for training is:

(1)SVM的训练目标是寻找一个可对正负样本实现分类的最优超平面,其数学形式可表示为:(1) The training goal of SVM is to find an optimal hyperplane that can classify positive and negative samples, and its mathematical form can be expressed as:

其中,w表示与超平面垂直的向量,||w||表示w的范数,ξi表示松弛变量,是一个非负数,D是一个参数,用于控制目标函数中两项的权重,xi表示第i个样本的HOG特征,yi表示第i个样本的样本标签,b表示一个常数;Among them, w represents the vector perpendicular to the hyperplane, ||w|| represents the norm of w, ξ i represents the slack variable, which is a non-negative number, D is a parameter used to control the weight of the two terms in the objective function, x i represents the HOG feature of the ith sample, yi represents the sample label of the ith sample, and b represents a constant;

(2)构建拉格朗日函数:(2) Build the Lagrangian function:

其中,αi表示拉格朗日乘子,ri=D-αi,然后令where α i represents the Lagrange multiplier, r i =D-α i , then let

目标函数转化为The objective function is transformed into

其中,d*表示目标函数最优值;Among them, d * represents the optimal value of the objective function;

(3)让L针对w,b,ξ最小化,即:(3) Minimize L with respect to w, b, ξ, namely:

将式(11)带入式(8),则目标函数转化为:Putting Equation (11) into Equation (8), the objective function is transformed into:

其中,<xi,xj>表示求xi,xj的内积;Among them, < xi ,x j > means to find the inner product of x i , x j ;

(4)利用SMO算法求拉格朗日乘子αi的最优值,利用启发式算法选取一对拉格朗日乘子αij;固定除αij外的其他参数,确定w取极值条件下αi的取值,并用αi表示αj;不断重复直到目标函数收敛;(4) Use the SMO algorithm to find the optimal value of the Lagrangian multiplier α i , and use the heuristic algorithm to select a pair of Lagrangian multipliers α i , α j ; fix other parameters except α i , α j , determine the value of α i under the condition that w takes the extreme value, and use α i to represent α j ; keep repeating until the objective function converges;

(5)根据拉格朗日乘子的最优值确定最优超平面:(5) Determine the optimal hyperplane according to the optimal value of the Lagrange multiplier:

其中,表示拉格朗日乘子的最优值,w*,b*分别表示最优超平面的方向以及与原点的偏移;in, Represents the optimal value of the Lagrange multiplier, w * , b * represent the direction of the optimal hyperplane and the offset from the origin, respectively;

(6)得到分类决策函数,即训练好的SVM分类器:(6) Obtain the classification decision function, that is, the trained SVM classifier:

.

优选地,步骤3中对目标区域定位和筛选的具体步骤为:Preferably, the specific steps for locating and screening the target area in step 3 are:

步骤3-1、利用梅林傅里叶变换和相位相关技术对待检测图片中的目标断路器区域进行粗定位;Step 3-1. Use Merlin Fourier transform and phase correlation technology to roughly locate the target circuit breaker area in the image to be detected;

步骤3-2、利用机器学习的方法对目标断路器区域进行精确定位,将待检测图像送入训练过的分类器,得到若干个目标候选区域;Step 3-2, using the machine learning method to accurately locate the target circuit breaker area, send the image to be detected into the trained classifier, and obtain several target candidate areas;

步骤3-3、分别将每个目标候选区域与粗定位目标滑块式断路器区域求交并比参数IOU;将每个目标候选区域图像与模板图像中的滑块式断路器区域图像做感知哈希计算,获得感知哈希指标;计算每个目标候选区域图像与模板图像的互信息指标,筛选目标候选区域得到滑块式断路器。Step 3-3, respectively intersect each target candidate area and the rough positioning target slider-type circuit breaker area and compare the parameter IOU; perceive each target candidate area image and the slider-type circuit breaker area image in the template image Hash calculation to obtain the perceptual hash index; calculate the mutual information index of each target candidate region image and the template image, and filter the target candidate region to obtain a slider circuit breaker.

优选地,步骤3-3中感知哈希指标、交并比参数IOU和互信息指标I(G(X),H(Y))的具体计算方法分别为:Preferably, in step 3-3, the specific calculation methods of perceptual hash index, intersection ratio parameter IOU and mutual information index I(G (X) , H (Y) ) are respectively:

(1)将目标候选区域图像与模板图像缩放到同一大小,进行余弦变换,选取余弦变换后的图像左上角的低频区域,去除坐标(0,0)的直流分量得到特征向量,计算目标候选区域图像与模板图像的特征向量的汉明距离,作为感知哈希指标;(1) Scale the target candidate area image and the template image to the same size, perform cosine transformation, select the low-frequency area in the upper left corner of the cosine-transformed image, remove the DC component of the coordinate (0,0) to obtain the feature vector, and calculate the target candidate area. The Hamming distance of the feature vector of the image and the template image, as a perceptual hash index;

(2)交并比参数IOU具体计算公式为:(2) The specific calculation formula of the intersection ratio parameter IOU is:

式中,C为粗定位目标断路器区域,ni为目标候选区域;In the formula, C is the rough positioning target circuit breaker area, and n i is the target candidate area;

(3)互信息指标I(G(X),H(Y))的计算公式为:(3) The calculation formula of the mutual information index I(G (X) ,H (Y) ) is:

G(X)、H(Y)分别为模板图像与候选图像灰度像素的数目,W、H分别为候选区域图像宽、高。G (X) and H (Y) are the number of grayscale pixels in the template image and the candidate image, respectively, and W and H are the width and height of the candidate region image, respectively.

优选地,步骤3-3中筛选目标候选区域得到滑块式断路器的具体方法为:Preferably, in step 3-3, the specific method for screening the target candidate area to obtain the slider-type circuit breaker is as follows:

将每一候选区域的交并比IOU、互信息、感知哈希pHash三种指标做加权求出该候选区域的置信度,其中D为一常数:The confidence of each candidate area is calculated by weighting the intersection ratio IOU, mutual information and perceptual hash pHash of each candidate area, where D is a constant:

Confidence=1-(pHash+1/I(G(X),H(y)))/(IOU+D) (20)Confidence=1-(pHash+1/I(G (X) ,H (y) ))/(IOU+D)(20)

按照所有候选区域的置信度从大到小排序,求出置信度最大的区域,该区域作为备选检测结果。若备选检测结果的IOU满足小于设定阈值thresholdIOU且(pHash+1/I(G(X),H(Y)))大于阈值thresholdA时,将步骤3-2确定的粗定位目标断路器区域作为最终目标,否则以备选检测结果作为最终目标。阈值thresholdIOU取值范围0.1~0.4,阈值thresholdA取值范围10~50。Sort all candidate regions in descending order of confidence, find the region with the highest confidence, and use this region as the candidate detection result. If the IOU of the alternative detection result is less than the set threshold thresholdIOU and (pHash+1/I(G (X) ,H (Y) )) is greater than the threshold thresholdA, the coarse positioning target circuit breaker area determined in step 3-2 As the final target, otherwise the candidate detection result is used as the final target. The threshold value thresholdIOU ranges from 0.1 to 0.4, and the threshold value thresholdA ranges from 10 to 50.

优选地,步骤4中图像预处理的具体方法为:Preferably, the specific method of image preprocessing in step 4 is:

步骤4-1、对灰度图像进行直方图均衡化,增加图像的整体对比度,使图像更清晰;Step 4-1. Perform histogram equalization on the grayscale image to increase the overall contrast of the image and make the image clearer;

步骤4-2、对图像进行高斯滤波,消除图像上的高斯噪声;Step 4-2, perform Gaussian filtering on the image to eliminate Gaussian noise on the image;

步骤4-3、对图像进行大津法二值化,使目标图像与背景图像区分开来;Step 4-3, perform Otsu binarization on the image to distinguish the target image from the background image;

步骤4-4、对图像进行开运算,使目标图像边界平滑,消除细小的尖刺,断开窄小的连接;Step 4-4, perform an open operation on the image to smooth the boundary of the target image, eliminate small spikes, and disconnect narrow connections;

步骤4-5、对图像进行轮廓扫描,提取出连通面积最大的两个区域,按照位置分为左右两部分。Step 4-5, perform contour scanning on the image, extract the two areas with the largest connected area, and divide them into left and right parts according to their positions.

本发明与现有技术相比,其显著优点为:(1)本发明能够实时监控捕获滑块式断路器信息,自动识别电力系统断路器状态,增加了电力巡检机器人的自动化水平,提高了工作效率;(3)本发明融合机器人定位信息和机器学习,使得位置重复度高(比如低于5cm的定位),尺度、旋转等变化较小;(2)本发明在不同光照、姿态条件下能有效完成滑块式断路器检测识别任务,提高了复杂环境下图像的识别准确率,最大限度的减少了漏检、误检问题。Compared with the prior art, the present invention has the following significant advantages: (1) the present invention can monitor and capture the information of the slider-type circuit breaker in real time, automatically identify the state of the circuit breaker in the power system, increase the automation level of the power inspection robot, and improve the Work efficiency; (3) the present invention integrates robot positioning information and machine learning, so that the position repeatability is high (for example, the positioning is less than 5cm), and the changes in scale and rotation are small; (2) the present invention is under different lighting and attitude conditions. It can effectively complete the detection and recognition task of slider-type circuit breakers, improve the recognition accuracy of images in complex environments, and minimize the problems of missed detection and false detection.

附图说明Description of drawings

图1为本发明的流程示意图。FIG. 1 is a schematic flow chart of the present invention.

图2为采集的模板图像示意图。Figure 2 is a schematic diagram of the collected template image.

图3为滑块式断路器预处理后的图像。Figure 3 is an image of the slider-type circuit breaker after preprocessing.

图4为滑块式断路器提取连通区域后图像,其中图4(a)为滑块式断路器提取连通区域后左边部分图像,图4(b)为滑块式断路器提取连通区域后右边部分图像。Figure 4 is the image of the slider-type circuit breaker after extracting the connected area, in which Figure 4(a) is the left part of the image after the slider-type circuit breaker extracts the connected area, and Figure 4(b) is the right-side image of the slider-type circuit breaker after extracting the connected area part of the image.

具体实施方式Detailed ways

下面结合附图对本发明做进一步详细的描述。The present invention will be described in further detail below with reference to the accompanying drawings.

如图1所示,一种基于巡检机器人的滑块式断路器识别方法,具体步骤为:As shown in Figure 1, a method for identifying a slider-type circuit breaker based on an inspection robot, the specific steps are:

步骤1、为每个巡检点选取一张在该巡检点拍摄的断路器居中的图像作为模板图像,利用提前采集的滑块式断路器图像数集训练SVM多分类器,具体方法为:Step 1. For each inspection point, select an image in the center of the circuit breaker taken at the inspection point as a template image, and use the number of slider-type circuit breaker images collected in advance to train the SVM multi-classifier. The specific method is as follows:

步骤1-1、提前采集指针式断路器图像数集作为正负训练样本集合:(1)采集指针式断路器的图片,对于显示开合状态的圆形图片,将处于开状态的图片作为正样本集,处于合状态的图片作为负样本集;对于显示储能状态的圆形图片将处于储能状态的图片作为正样本集,未储能状态的图片作为负样本集;Step 1-1. Collect the number of pointer-type circuit breaker images in advance as a set of positive and negative training samples: (1) Collect the pictures of the pointer-type circuit breaker. For the circular picture showing the opening and closing state, the picture in the open state is used as the positive and negative training sample set: (1) Collect the pictures of the pointer circuit breaker For the sample set, the pictures in the combined state are regarded as the negative sample set; for the circular pictures showing the energy storage state, the pictures in the energy storage state are regarded as the positive sample set, and the pictures in the non-energy storage state are regarded as the negative sample set;

(2)裁剪图片,删除指针式断路器上圆形区域之外的多余信息,具体为:(2) Crop the picture and delete the redundant information outside the circular area on the pointer circuit breaker, specifically:

(3)将图片缩放为长m像素,宽n像素。(3) Scale the image to be m pixels long and n pixels wide.

步骤1-2、提取正负训练样本集合的HOG特征,具体为:Step 1-2, extract the HOG features of the positive and negative training sample sets, specifically:

(1)将彩色图像转化为灰度图像;(1) Convert the color image to a grayscale image;

(2)对灰度图像进行Gamma矫正,减少图像局部的阴影和光照变化,Gamma矫正的公式为:(2) Gamma correction is performed on the grayscale image to reduce local shadow and illumination changes in the image. The formula for Gamma correction is:

I(x,y)=I(x,y)gamma (1)I(x,y)=I(x,y) gamma (1)

其中,I(x,y)表示图像第x行第y列的像素值,gamma取0-1之间的数;Among them, I(x,y) represents the pixel value of the xth row and the yth column of the image, and gamma takes a number between 0-1;

(3)根据下式计算图像每个像素的梯度:(3) Calculate the gradient of each pixel of the image according to the following formula:

Gx(x,y)=H(x+1,y)-H(x-1,y) (2)G x (x,y)=H(x+1,y)-H(x-1,y) (2)

Gy(x,y)=H(x,y+1)-H(x,y-1) (3)G y (x,y)=H(x,y+1)-H(x,y-1) (3)

其中,Gx(x,y),Gy(x,y),H(x,y)分别表示图像中像素点(x,y)处的水平方向梯度,垂直方向梯度和像素值,像素点(x,y)处的梯度幅值G(x,y)与梯度方向α(x,y)则可根据下式得到:Among them, G x (x, y), G y (x, y), H (x, y) represent the horizontal gradient, vertical gradient and pixel value at the pixel point (x, y) in the image, respectively. The gradient magnitude G(x,y) at (x,y) and the gradient direction α(x,y) can be obtained according to the following formula:

(4)将图像分割为一个个边长为a像素的正方形单元格,a为m和n的最大公因数,为每个单元格创建梯度方向直方图,将梯度方向360度划分为k个方向块,第i个方向块的方向范围为统计单元格内各个像素的梯度方向,如果梯度方向属于某个方向块,则对应方向块的计数值加上这个梯度对应的幅值;(4) Divide the image into square cells with a side length of a pixels, a is the greatest common factor of m and n, create a gradient direction histogram for each cell, and divide the gradient direction 360 degrees into k directions block, the direction range of the ith direction block is Count the gradient direction of each pixel in the cell. If the gradient direction belongs to a certain direction block, the count value of the corresponding direction block is added to the amplitude corresponding to this gradient;

(5)将单元格组合成块,块内归一化梯度直方图将每个单元格对应的梯度直方图改写为向量形式,将每个块内的所有梯度向量串联起来,形成这个块的梯度方向直方图向量;将向量乘上对应的归一化因子,归一化因子的计算公式为:(5) Combine the cells into blocks, and the normalized gradient histogram in the block rewrites the gradient histogram corresponding to each cell into a vector form, and concatenates all the gradient vectors in each block to form the gradient of the block Direction histogram vector; multiply the vector by the corresponding normalization factor, the calculation formula of the normalization factor is:

其中,v表示还未归一化的向量,||v||2表示v的2阶范数,e表示常数;Among them, v represents a vector that has not been normalized, ||v|| 2 represents the second-order norm of v, and e represents a constant;

(6)将图像中所有块的归一化后的向量串联起来得到训练样本集合HOG特征(6) Concatenate the normalized vectors of all blocks in the image to obtain the HOG feature of the training sample set

步骤1-3、给所有正负训练样本集合赋予样本标签,将训练样本集合的HOG特征以及样本标签送入SVM中进行训练:Steps 1-3, assign sample labels to all positive and negative training sample sets, and send the HOG features and sample labels of the training sample set to SVM for training:

(1)SVM的训练目标是寻找一个可对正负样本实现分类的最优超平面,其数学形式可表示为:(1) The training goal of SVM is to find an optimal hyperplane that can classify positive and negative samples, and its mathematical form can be expressed as:

其中,w表示与超平面垂直的向量,||w||表示w的范数,ξi表示松弛变量,是一个非负数,D是一个参数,用于控制目标函数中两项的权重,xi表示第i个样本的HOG特征,yi表示第i个样本的样本标签,b表示一个常数;Among them, w represents the vector perpendicular to the hyperplane, ||w|| represents the norm of w, ξ i represents the slack variable, which is a non-negative number, D is a parameter used to control the weight of the two terms in the objective function, x i represents the HOG feature of the ith sample, yi represents the sample label of the ith sample, and b represents a constant;

(2)构建拉格朗日函数:(2) Build the Lagrangian function:

其中,αi表示拉格朗日乘子,ri=D-αi,然后令where α i represents the Lagrange multiplier, r i =D-α i , then let

目标函数转化为The objective function is transformed into

其中,d*表示目标函数最优值;Among them, d* represents the optimal value of the objective function;

(3)让L针对w,b,ξ最小化,即:(3) Minimize L with respect to w, b, ξ, namely:

将式(11)带入式(8),则目标函数转化为:Putting Equation (11) into Equation (8), the objective function is transformed into:

其中,<xi,xj>表示求xi,xj的内积;Among them, < xi ,x j > means to find the inner product of x i , x j ;

(4)利用SMO算法求拉格朗日乘子αi的最优值,利用启发式算法选取一对拉格朗日乘子αij;固定除αij外的其他参数,确定w取极值条件下αi的取值,并用αi表示αj;不断重复直到目标函数收敛;(4) Use the SMO algorithm to find the optimal value of the Lagrangian multiplier α i , and use the heuristic algorithm to select a pair of Lagrangian multipliers α i , α j ; fix other parameters except α i , α j , determine the value of α i under the condition that w takes the extreme value, and use α i to represent α j ; keep repeating until the objective function converges;

(5)根据拉格朗日乘子的最优值确定最优超平面:(5) Determine the optimal hyperplane according to the optimal value of the Lagrange multiplier:

其中,表示拉格朗日乘子的最优值,w*,b*分别表示最优超平面的方向以及与原点的偏移;in, Represents the optimal value of the Lagrange multiplier, w * , b * represent the direction of the optimal hyperplane and the offset from the origin, respectively;

(6)得到分类决策函数,即训练好的SVM分类器:(6) Obtain the classification decision function, that is, the trained SVM classifier:

.

步骤2、巡检机器人通过定位导航到达指定巡检点,获取现场滑块式断路器图像并以灰度图的形式读入,用于滑块式断路器检测识别;Step 2. The inspection robot reaches the designated inspection point through positioning and navigation, obtains the image of the on-site slider-type circuit breaker and reads it in the form of a grayscale image, which is used for the detection and identification of the slider-type circuit breaker;

步骤3、对待检测的目标区域进行粗定位和精确定位,筛选目标候选区域得到滑块式断路器图像,具体为:Step 3. Perform coarse positioning and precise positioning on the target area to be detected, and filter the target candidate area to obtain the slider-type circuit breaker image, specifically:

步骤3-1、利用梅林傅里叶变换和相位相关技术对待检测图片中的目标断路器区域进行粗定位;Step 3-1. Use Merlin Fourier transform and phase correlation technology to roughly locate the target circuit breaker area in the image to be detected;

步骤3-2、利用机器学习的方法对目标断路器区域进行精确定位,将待检测图像送入训练过的分类器,得到若干个目标候选区域;Step 3-2, using the machine learning method to accurately locate the target circuit breaker area, send the image to be detected into the trained classifier, and obtain several target candidate areas;

步骤3-3、分别将每个目标候选区域与粗定位目标指针式断路器区域求交并比参数IOU,将每个目标候选区域图像与模板图像中的指针式断路器区域图像做感知哈希计算,获得感知哈希指标,计算每个目标候选区域图像与模板图像的互信息指标,筛选目标候选区域得到指针式断路器,具体为:Step 3-3, respectively intersect each target candidate area with the coarse positioning target pointer circuit breaker area and compare the parameter IOU, and perform perceptual hashing between each target candidate area image and the pointer circuit breaker area image in the template image Calculate, obtain the perceptual hash index, calculate the mutual information index between each target candidate area image and the template image, and filter the target candidate area to obtain a pointer circuit breaker, specifically:

(1)将目标候选区域图像与模板图像缩放到同一大小,进行余弦变换,选取余弦变换后的图像左上角的低频区域,去除坐标(0,0)的直流分量得到特征向量,计算目标候选区域图像与模板图像的特征向量的汉明距离,作为感知哈希指标;(1) Scale the target candidate area image and the template image to the same size, perform cosine transformation, select the low-frequency area in the upper left corner of the cosine-transformed image, remove the DC component of the coordinate (0,0) to obtain the feature vector, and calculate the target candidate area. The Hamming distance of the feature vector of the image and the template image, as a perceptual hash index;

(2)交并比参数IOU具体计算公式为:(2) The specific calculation formula of the intersection ratio parameter IOU is:

式中,C为粗定位目标断路器区域,ni为目标候选区域;In the formula, C is the rough positioning target circuit breaker area, and n i is the target candidate area;

(3)互信息指标I(G(X),H(Y))的计算公式为:(3) The calculation formula of the mutual information index I(G (X) ,H (Y) ) is:

G(X)、H(Y)分别为模板图像与候选图像灰度像素的数目,W、H分别为候选区域图像宽、高。G (X) and H (Y) are the number of grayscale pixels in the template image and the candidate image, respectively, and W and H are the width and height of the candidate region image, respectively.

将每一候选区域的交并比IOU、互信息、感知哈希pHash三种指标做加权求出该候选区域的置信度,其中D为一常数:The confidence of each candidate area is calculated by weighting the intersection ratio IOU, mutual information and perceptual hash pHash of each candidate area, where D is a constant:

Confidence=1-(pHash+1/I(G(X),H(y)))/(IOU+D) (20)Confidence=1-(pHash+1/I(G (X) ,H (y) ))/(IOU+D)(20)

按照所有候选区域的置信度从大到小排序,求出置信度最大的区域,该区域作为备选检测结果。若备选检测结果的IOU满足小于设定阈值thresholdIOU且(pHash+1/I(G(X),H(Y)))大于阈值thresholdA时,将步骤3-2确定的粗定位目标断路器区域作为最终目标,否则以备选检测结果作为最终目标。阈值thresholdIOU取值范围0.1~0.4,阈值thresholdA取值范围10~50。Sort all candidate regions in descending order of confidence, find the region with the highest confidence, and use this region as the candidate detection result. If the IOU of the alternative detection result is less than the set threshold thresholdIOU and (pHash+1/I(G (X) ,H (Y) )) is greater than the threshold thresholdA, the coarse positioning target circuit breaker area determined in step 3-2 As the final target, otherwise the candidate detection result is used as the final target. The threshold value thresholdIOU ranges from 0.1 to 0.4, and the threshold value thresholdA ranges from 10 to 50.

步骤4、对获取到的现场滑块式断路器图像进行预处理,提取出连通面积最大的两个区域,按照位置分为左右两个部分,具体为:Step 4. Preprocess the acquired image of the on-site slider-type circuit breaker, extract the two areas with the largest connected area, and divide them into left and right parts according to their positions, specifically:

步骤4-1、对灰度图像进行直方图均衡化,增加图像的整体对比度,使图像更清晰;Step 4-1. Perform histogram equalization on the grayscale image to increase the overall contrast of the image and make the image clearer;

步骤4-2、对图像进行高斯滤波,消除图像上的高斯噪声;Step 4-2, perform Gaussian filtering on the image to eliminate Gaussian noise on the image;

步骤4-3、对图像进行大津法二值化,使目标图像与背景图像区分开来;Step 4-3, perform Otsu binarization on the image to distinguish the target image from the background image;

步骤4-4、对图像进行开运算,使目标图像边界平滑,消除细小的尖刺,断开窄小的连接;Step 4-4, perform an open operation on the image to smooth the boundary of the target image, eliminate small spikes, and disconnect narrow connections;

步骤4-5、对图像进行轮廓扫描,提取出连通面积最大的区域。Steps 4-5, perform contour scanning on the image, and extract the area with the largest connected area.

步骤4-6、检测圆心,计算图形的梯度,并确定圆周线,在二维霍夫空间内,给出所有图形的梯度直线,并在4邻域内进行非最大值抑制,设定一个阈值,霍夫空间内累加和大于该阈值的点就对应圆心;Step 4-6: Detect the center of the circle, calculate the gradient of the graph, and determine the circle line. In the two-dimensional Hough space, give the gradient straight line of all graphs, and perform non-maximum suppression in the 4 neighborhoods, and set a threshold, The point whose accumulated sum is greater than this threshold in Hough space corresponds to the center of the circle;

步骤4-7、检测圆半径,计算一个圆心到所有圆周线的距离,找到距离相同的值,计算相同值的数量,只有当相同值数量大于某一阈值时才认为是该圆心对应的圆半径,对另一个圆心按照同样的方法检测其对应的圆半径。Step 4-7. Detect the radius of the circle, calculate the distance from the center of a circle to all the circle lines, find the value with the same distance, and calculate the number of the same value. Only when the number of the same value is greater than a certain threshold is considered as the circle radius corresponding to the center of the circle , and detect its corresponding circle radius in the same way for another circle center.

步骤5、对两个分离出的区域分别进行像素调整,以长m像素,宽n像素的滑动窗口在图像上滑动,对窗口提取HOG特征,将计算得到的HOG特征算子送入SVM多分类器得到最终的识别结果。Step 5. Perform pixel adjustment on the two separated areas respectively, slide on the image with a sliding window with a length of m pixels and a width of n pixels, extract the HOG feature from the window, and send the calculated HOG feature operator to the SVM multi-classification get the final recognition result.

实施例1Example 1

一种基于巡检机器人的滑块式断路器识别方法,包括以下步骤:A method for identifying a slider-type circuit breaker based on an inspection robot, comprising the following steps:

步骤1、为每个巡检点选取一张在该巡检点拍摄的断路器居中的图像作为模板图像,如图2所示,利用提前采集的滑块式断路器图像数集训练SVM多分类器;Step 1. For each inspection point, select an image of the circuit breaker in the center of the inspection point as a template image, as shown in Figure 2, use the slider-type circuit breaker image data set collected in advance to train SVM multi-classification device;

步骤1-1、准备训练样本集合,具体为:Step 1-1. Prepare a training sample set, specifically:

(1)采集100000张含有滑块式断路器的图片,将位于储能状态的图片作为正样本集,位于未储能状态的图片作为负样本集;(1) Collect 100,000 pictures containing the slider-type circuit breaker, take the pictures in the energy storage state as the positive sample set, and the pictures in the non-energy storage state as the negative sample set;

(2)裁剪图片,,删除滑块式断路器上滑块显示窗口区域之外的多余信息(2) Crop the picture, delete the redundant information outside the slider display window area on the slider-type circuit breaker

(3)将图片缩放为长宽均为48像素的矩形;(3) Scale the picture into a rectangle whose length and width are both 48 pixels;

步骤1-2、提取正负样本的HOG特征,具体为:Step 1-2, extract the HOG features of positive and negative samples, specifically:

(1)将彩色图像转化为灰度图像;(1) Convert the color image to a grayscale image;

(2)对灰度图像进行Gamma矫正,减少图像局部的阴影和光照变化。式(1)为Gamma矫正公式,其中,gamma取0.5;(2) Gamma correction is performed on the grayscale image to reduce local shadow and illumination changes in the image. Equation (1) is the Gamma correction formula, where gamma is 0.5;

(3)根据式(2)(3)计算图像每个像素的水平与垂直梯度,然后根据式(4)(5)计算像素点(x,y)处的梯度幅值与梯度方向;(3) Calculate the horizontal and vertical gradients of each pixel of the image according to formula (2) (3), and then calculate the gradient magnitude and gradient direction at the pixel point (x, y) according to formula (4) (5);

(4)将图像分割为一个个边长为8像素的正方形单元格,为每个单元格创建梯度方向直方图。将梯度方向360度划分为9个方向块,统计单元格内各个像素的梯度方向,如果梯度方向属于某个方向块,则对应方向块的计数值加上这个梯度对应的幅值,将单元格组合成边长为16像素的块,块内归一化梯度直方图,减少光照、阴影和边缘对梯度的影响;将图像中所有块的归一化后的向量串联起来就得到了其HOG特征;(4) Divide the image into square cells with a side length of 8 pixels, and create a gradient direction histogram for each cell. Divide the gradient direction into 9 direction blocks 360 degrees, and count the gradient directions of each pixel in the cell. If the gradient direction belongs to a certain direction block, the count value of the corresponding direction block is added to the amplitude corresponding to this gradient. Combined into a block with a side length of 16 pixels, the gradient histogram is normalized within the block to reduce the influence of light, shadow and edge on the gradient; the HOG feature is obtained by concatenating the normalized vectors of all blocks in the image. ;

步骤1-3、给所有正负样本赋予样本标签,将正负样本的HOG特征以及样本标签送入SVM中进行训练,具体步骤为:Steps 1-3, assign sample labels to all positive and negative samples, and send the HOG features and sample labels of positive and negative samples into SVM for training. The specific steps are:

(1)SVM的训练目标是寻找一个可对正负样本实现分类的最优超平面,其数学形式可用式(7)表示;(1) The training goal of SVM is to find an optimal hyperplane that can classify positive and negative samples, and its mathematical form can be expressed by equation (7);

(2)构建拉格朗日函数,如式(8),并根据式(9)将目标函数转化为式(10);(2) Construct the Lagrangian function, such as formula (8), and transform the objective function into formula (10) according to formula (9);

(3)让L针对w,b,ξ最小化,将目标函数转化为式(12);(3) Minimize L for w, b, ξ, and convert the objective function into formula (12);

(4)利用SMO算法求拉格朗日乘子αi的最优值;(4) Use the SMO algorithm to find the optimal value of the Lagrange multiplier α i ;

(5)根据拉格朗日乘子的最优值以及式(13)确定最优超平面;(5) Determine the optimal hyperplane according to the optimal value of the Lagrange multiplier and equation (13);

(6)得到分类决策函数式(14),即训练好的SVM分类器:(6) Obtain the classification decision function formula (14), that is, the trained SVM classifier:

步骤2、巡检机器人通过定位导航到达指定巡检点,导航误差6cm,获取一张滑块式断路器图像并以灰度图的形式读入,用于检测识别;Step 2. The inspection robot reaches the designated inspection point through positioning and navigation, with a navigation error of 6cm, obtains an image of a slider-type circuit breaker and reads it in the form of a grayscale image for detection and identification;

步骤3、对待检测的目标区域进行粗定位和精确定位,筛选目标候选区域得到滑块式断路器;Step 3. Perform coarse positioning and precise positioning on the target area to be detected, and filter the target candidate area to obtain a slider-type circuit breaker;

步骤3-1、利用梅林傅里叶变换和相位相关技术对待检测图片中的目标断路器区域进行粗定位;Step 3-1. Use Merlin Fourier transform and phase correlation technology to roughly locate the target circuit breaker area in the image to be detected;

步骤3-2、利用提前训练好的机器学习Adaboost分类器对待检测图像进行精确定位,得到若干个目标候选区域;Step 3-2, use the machine learning Adaboost classifier trained in advance to accurately locate the image to be detected, and obtain several target candidate regions;

步骤3-3、分别将每个目标候选区域与粗定位目标滑块式断路器区域求交并比参数IOU;将每个目标候选区域图像与模板图像中的滑块式断路器区域图像做感知哈希计算,获得感知哈希指标;计算每个目标候选区域图像与模板图像的互信息指标,筛选目标候选区域得到滑块式断路器;Step 3-3, respectively intersect each target candidate area and the rough positioning target slider-type circuit breaker area and compare the parameter IOU; perceive each target candidate area image and the slider-type circuit breaker area image in the template image Hash calculation to obtain the perceptual hash index; calculate the mutual information index of each target candidate area image and the template image, and filter the target candidate area to obtain a slider circuit breaker;

(1)计算感知哈希pHash指标。分类器得到的候选区域图像与截取模板图像中断路器区域图像做感知哈希pHash计算。感知哈希pHash计算是将两张图片缩放到32*32的大小,进行余弦变换,选取余弦变换后的图像左上角的8*8的区域,去除坐标(0,0)的直流分量得到63维特征向量,计算图像A和图像B的特征向量的汉明距离,作为感知哈希pHash指标;(1) Calculate the perceptual hash pHash indicator. The candidate area image obtained by the classifier and the circuit breaker area image in the intercepted template image are calculated by perceptual hash pHash. The perceptual hash pHash calculation is to scale the two images to a size of 32*32, perform cosine transformation, select the 8*8 area in the upper left corner of the cosine-transformed image, and remove the DC component of the coordinate (0,0) to obtain 63 dimensions. Feature vector, calculate the Hamming distance of the feature vector of image A and image B, as the perceptual hash pHash indicator;

(2)利用公式(16)~(19)计算互信息指标;(2) Use formulas (16) to (19) to calculate the mutual information index;

(3)利用公式(15)计算交并比参数IOU,分别得到三个交并比参数指标(0.7,0.0,0.0);(3) Calculate the intersection ratio parameter IOU using formula (15), and obtain three intersection ratio parameter indicators (0.7, 0.0, 0.0) respectively;

(4)将每一候选区域的交并比IOU、互信息、感知哈希pHash三种指标按照公式(20)做加权求出该候选区域的置信度;(4) The three indicators of the intersection ratio IOU, mutual information and perceptual hash pHash of each candidate area are weighted according to formula (20) to obtain the confidence level of the candidate area;

按照所有候选区域的置信度从大到小排序,求出置信度最大的区域,作为最终区域。Sort all candidate regions in descending order of confidence, and find the region with the highest confidence as the final region.

步骤4、对获取到的现场滑块式断路器图像进行预处理,处理后的图像如图3所示,提取出连通面积最大的两个区域,按照位置分为左右两部分,如图4所示;Step 4. Preprocess the acquired image of the on-site slider-type circuit breaker. The processed image is shown in Figure 3. The two areas with the largest connected area are extracted and divided into left and right parts according to their positions, as shown in Figure 4. Show;

步骤5、对两个分离出的区域分别进行像素调整,以长宽均为48像素的滑动窗口在图像上滑动,对窗口提取HOG特征,将提取到的HOG特征送入SVM中进行判断,得到最终检测结果。Step 5. Perform pixel adjustment on the two separated areas respectively, slide on the image with a sliding window with a length and width of 48 pixels, extract the HOG feature from the window, and send the extracted HOG feature into the SVM for judgment. Final test result.

Claims (9)

1. A method for identifying a slider type circuit breaker based on an inspection robot is characterized by comprising the following steps:
step 1, selecting a picture in the middle of the circuit breaker shot at each inspection point as a template picture for each inspection point, and training an SVM (support vector machine) multi-classifier by utilizing a slider type circuit breaker picture number set collected in advance;
step 2, the inspection robot reaches a specified inspection point through positioning and navigation, acquires an on-site slider type circuit breaker image and reads the image in a gray scale pattern form for detection and identification of the slider type circuit breaker;
step 3, carrying out coarse positioning and accurate positioning on a target area to be detected, and screening a target candidate area to obtain a slider type circuit breaker image;
step 4, preprocessing the acquired on-site slider type circuit breaker image, extracting two areas with the largest communication area, and dividing the two areas into a left part and a right part according to positions;
and 5, respectively carrying out pixel adjustment on the two separated regions, sliding a sliding window with the length of m pixels and the width of n pixels on the image, extracting HOG characteristics from the window, and sending the HOG characteristic operator obtained by calculation into the SVM multi-classifier to obtain a final recognition result.
2. The inspection robot-based slider type circuit breaker recognition method according to claim 1, wherein the specific method for training the SVM multiple classifiers in the step 1 is as follows:
step 1-1, collecting a slider type circuit breaker image number set as a positive and negative training sample set;
step 1-2, extracting HOG characteristics of a positive and negative training sample set;
and 1-3, endowing all positive and negative training sample sets with sample labels, and sending the HOG characteristics of the training sample sets and the sample labels into the SVM for training.
3. The inspection robot-based slider type circuit breaker recognition method according to claim 2, wherein the specific method for preparing the training sample set in the step 1-1 is as follows:
(1) collecting pictures of the slider type circuit breaker, and taking the pictures in an energy storage state as a positive sample set and the pictures in an energy non-storage state as a negative sample set;
(2) cutting pictures, and deleting redundant information outside a slider display window area on the slider type circuit breaker;
(3) the picture is scaled to m pixels long and n pixels wide, with m and n ranging from 36-64.
4. The inspection robot-based slider type circuit breaker identification method according to claim 2, wherein the specific method for extracting the positive and negative training sample set HOG features in the step 1-2 is as follows:
(1) converting the color image into a gray image;
(2) gamma correction is carried out on the gray level image, the local shadow and illumination change of the image are reduced, and the formula of the Gamma correction is as follows:
I(x,y)=I(x,y)gamma(1)
wherein I (x, y) represents the pixel value of the x row and the y column of the image, and gamma takes a number between 0 and 1;
(3) the gradient of each pixel of the image is calculated according to the following formula:
Gx(x,y)=H(x+1,y)-H(x-1,y) (2)
Gy(x,y)=H(x,y+1)-H(x,y-1) (3)
wherein G isx(x,y),Gy(x, y), H (x, y) respectively represents the horizontal gradient, the vertical gradient and the pixel value of the pixel point (x, y) in the image, and the gradient magnitude G (x, y) and the gradient direction α (x, y) of the pixel point (x, y) can be obtained according to the following formula:
(4) dividing an image into square cells with the side length of a pixel, wherein a is the maximum common factor of m and n, creating a gradient direction histogram for each cell, dividing the gradient direction into k direction blocks by 360 degrees, and the direction range of the ith direction block isCounting the gradient direction of each pixel in the cell, and if the gradient direction belongs to a certain direction block, adding the count value of the corresponding direction block to the amplitude value corresponding to the gradient;
(5) combining the unit cells into blocks, rewriting the gradient histogram corresponding to each unit cell into a vector form by the intra-block normalized gradient histogram, and connecting all gradient vectors in each block in series to form a gradient direction histogram vector of the block; multiplying the vector by a corresponding normalization factor, wherein the calculation formula of the normalization factor is as follows:
wherein v represents a vector that has not been normalized, | v | | | luminance2A norm of order 2 representing v, e representing a constant;
(6) and connecting the normalized vectors of all the blocks in the image in series to obtain the HOG characteristic of the training sample set.
5. The inspection robot-based slider type circuit breaker recognition method according to claim 2, wherein the specific method of feeding the HOG features and sample labels of the positive and negative training sample sets into the SVM for training in the step 1-3 is as follows:
(1) the training target of the SVM is to find an optimal hyperplane which can realize classification of positive and negative samples, and the mathematical form of the optimal hyperplane can be expressed as follows:
where w represents a vector perpendicular to the hyperplane, | | w | | | represents the norm of w, ξiRepresenting a relaxation variable, being a non-negative number, D being a parameter controlling the weight of two terms in the objective function, xiRepresenting HOG characteristics, y, of the ith sampleiA sample label representing the ith sample, b represents a constant;
(2) constructing a Lagrangian function:
wherein, αiRepresenting the Lagrange multiplier, ri=D-αiThen order
Transformation of objective function into
Wherein d is*Representing an optimal value of the objective function;
(3) let L minimize for w, b, ξ, i.e.:
by bringing equation (11) into equation (8), the objective function is transformed into:
wherein,<xi,xj>expression to xi,xjInner product of (d);
(4) lagrange multiplier α using SMO algorithmiUsing a heuristic algorithm to select a pair of lagrange multipliers αijFixing device αijDetermining α under the condition that w is extreme, among other parametersiIs taken from αiRepresentation αj(ii) a Repeating the steps until the target function is converged;
(5) determining an optimal hyperplane according to the optimal value of the Lagrange multiplier:
wherein,representing the optimum value of the Lagrange multiplier, w*,b*Squares representing respectively optimal hyperplanesOffset to and from the origin;
(6) obtaining a classification decision function, namely a trained SVM classifier:
6. the inspection robot-based slider type circuit breaker identification method according to claim 1, wherein the specific steps of positioning and screening the target area in the step 3 are as follows:
step 3-1, roughly positioning a target circuit breaker region in a picture to be detected by utilizing Mellin Fourier transform and phase correlation technology;
3-2, accurately positioning the target circuit breaker region by using a machine learning method, and sending the image to be detected into a trained classifier to obtain a plurality of target candidate regions;
and 3-3, respectively solving a merging ratio parameter IOU of each target candidate area and the coarse positioning target slide block type circuit breaker area, performing perceptual hash calculation on each target candidate area image and the slide block type circuit breaker area image in the template image to obtain perceptual hash indexes, calculating mutual information indexes of each target candidate area image and the template image, and screening the target candidate areas to obtain the slide block type circuit breakers.
7. The inspection robot-based slider type circuit breaker identification method according to claim 6, wherein the step 3-3 senses a hash index, an intersection ratio parameter IOU and a mutual information index I (G)(X),H(Y)) The specific calculation methods are respectively as follows:
(1) scaling the target candidate area image and the template image to the same size, performing cosine transform, selecting a low-frequency area at the upper left corner of the image after cosine transform, removing direct current components of coordinates (0,0) to obtain a characteristic vector, and calculating the Hamming distance of the characteristic vector of the target candidate area image and the characteristic vector of the template image to be used as a perceptual hash index;
(2) the specific calculation formula of the intersection ratio parameter IOU is as follows:
wherein C is a coarse positioning target breaker area, niA target candidate area is obtained;
(3) mutual information index I (G)(X),H(Y)) The calculation formula of (2) is as follows:
G(X)、H(Y)the number of grayscale pixels of the template image and the candidate image, respectively, and W, H the width and height of the candidate area image, respectively.
8. The method for identifying the sliding block type circuit breaker of the power inspection robot according to claim 6, wherein the specific method for screening the target candidate area to obtain the sliding block type circuit breaker in the step 3-3 is as follows:
weighting three indexes of the intersection ratio IOU, mutual information and perceptual hash pHash of each candidate region to obtain the confidence coefficient of the candidate region, wherein D is a constant:
Confidence=1-(pHash+1/I(G(X),H(y)))/(IOU+D) (20)
according to the sequence of the confidence degrees of all the candidate regions from large to small, the region with the maximum confidence degree is obtained and is used as the candidate detection result, and if the candidate detection resultsThe IOU of the fruit satisfies the condition that the IOU is less than the set threshold value and is (pHash +1/I (G)(X),H(Y)) When the circuit breaker area is larger than the threshold, the circuit breaker area with the rough positioning target determined in the step 3-2 is taken as a final target, otherwise, the alternative detection result is taken as the final target.
9. The inspection robot-based slider type circuit breaker identification method according to claim 1, wherein the image preprocessing in the step 4 comprises the following specific steps:
step 4-1, histogram equalization is carried out on the gray level image, and the overall contrast of the image is increased, so that the image is clearer;
4-2, carrying out Gaussian filtering on the image to eliminate Gaussian noise on the image;
4-3, carrying out Otsu binarization on the image to distinguish the target image from the background image;
4-4, performing opening operation on the image to smooth the boundary of the target image, eliminating tiny spikes and disconnecting narrow connection;
and 4-5, carrying out contour scanning on the image, and extracting two areas with the largest communication area.
CN201811148601.1A 2018-09-29 2018-09-29 Identification method of slider-type circuit breaker based on inspection robot Pending CN109344766A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811148601.1A CN109344766A (en) 2018-09-29 2018-09-29 Identification method of slider-type circuit breaker based on inspection robot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811148601.1A CN109344766A (en) 2018-09-29 2018-09-29 Identification method of slider-type circuit breaker based on inspection robot

Publications (1)

Publication Number Publication Date
CN109344766A true CN109344766A (en) 2019-02-15

Family

ID=65307905

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811148601.1A Pending CN109344766A (en) 2018-09-29 2018-09-29 Identification method of slider-type circuit breaker based on inspection robot

Country Status (1)

Country Link
CN (1) CN109344766A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109800824A (en) * 2019-02-25 2019-05-24 中国矿业大学(北京) A kind of defect of pipeline recognition methods based on computer vision and machine learning
CN109993168A (en) * 2019-04-09 2019-07-09 成都鹏业软件股份有限公司 Intelligent polling method
CN110321890A (en) * 2019-04-26 2019-10-11 重庆邮电大学 A kind of digital instrument recognition methods of electric inspection process robot
CN113077398A (en) * 2021-04-09 2021-07-06 上海申瑞继保电气有限公司 Circuit breaker circular on-off indicator lamp image noise filtering method
CN116882966A (en) * 2023-06-27 2023-10-13 广州慧云网络科技有限公司 A method and device for fault judgment of operation and maintenance equipment inspection results

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260412A (en) * 2015-09-24 2016-01-20 东方网力科技股份有限公司 Image storage method and device, and image retrieval method and device
CN106951930A (en) * 2017-04-13 2017-07-14 杭州申昊科技股份有限公司 A kind of instrument localization method suitable for Intelligent Mobile Robot
CN107610128A (en) * 2017-09-26 2018-01-19 山东鲁能智能技术有限公司 The method for inspecting and device of a kind of oil level indicator
CN107610162A (en) * 2017-08-04 2018-01-19 浙江工业大学 A kind of three-dimensional multimode state medical image autoegistration method based on mutual information and image segmentation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260412A (en) * 2015-09-24 2016-01-20 东方网力科技股份有限公司 Image storage method and device, and image retrieval method and device
CN106951930A (en) * 2017-04-13 2017-07-14 杭州申昊科技股份有限公司 A kind of instrument localization method suitable for Intelligent Mobile Robot
CN107610162A (en) * 2017-08-04 2018-01-19 浙江工业大学 A kind of three-dimensional multimode state medical image autoegistration method based on mutual information and image segmentation
CN107610128A (en) * 2017-09-26 2018-01-19 山东鲁能智能技术有限公司 The method for inspecting and device of a kind of oil level indicator

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
戴宪策 等: "基于傅里叶-梅林变换的图像匹配方法研究", 《红外技术》 *
沈新平 等: "《基于霍夫变换和RANSAC算法的绝缘子定位方法》", 《电子测量技术》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109800824A (en) * 2019-02-25 2019-05-24 中国矿业大学(北京) A kind of defect of pipeline recognition methods based on computer vision and machine learning
CN109993168A (en) * 2019-04-09 2019-07-09 成都鹏业软件股份有限公司 Intelligent polling method
CN109993168B (en) * 2019-04-09 2021-07-16 成都鹏业软件股份有限公司 Intelligent inspection method
CN110321890A (en) * 2019-04-26 2019-10-11 重庆邮电大学 A kind of digital instrument recognition methods of electric inspection process robot
CN110321890B (en) * 2019-04-26 2021-04-20 重庆邮电大学 A digital meter identification method for an electric power inspection robot
CN113077398A (en) * 2021-04-09 2021-07-06 上海申瑞继保电气有限公司 Circuit breaker circular on-off indicator lamp image noise filtering method
CN116882966A (en) * 2023-06-27 2023-10-13 广州慧云网络科技有限公司 A method and device for fault judgment of operation and maintenance equipment inspection results
CN116882966B (en) * 2023-06-27 2024-04-19 广东慧云科技股份有限公司 A method and device for judging faults of inspection results of operation and maintenance equipment

Similar Documents

Publication Publication Date Title
CN109447949A (en) Insulated terminal defect identification method based on crusing robot
CN109344766A (en) Identification method of slider-type circuit breaker based on inspection robot
CN111062915B (en) Real-time steel pipe defect detection method based on improved YOLOv3 model
CN109344768A (en) Pointer breaker recognition methods based on crusing robot
CN108537154B (en) Power transmission line bird nest identification method based on HOG characteristics and machine learning
CN109961024A (en) Weed detection method in wheat field based on deep learning
CN105574527B (en) A kind of quick object detecting method based on local feature learning
CN108564085B (en) A method of automatically reading the reading of a pointer-type meter
CN109859181A (en) A kind of PCB welding point defect detection method
CN111784633A (en) An automatic detection algorithm for insulator defects for power inspection video
CN106022345B (en) A kind of high voltage isolator state identification method based on Hough forest
Li et al. High-efficiency tea shoot detection method via a compressed deep learning model
CN111368690A (en) Deep learning-based video image ship detection method and system under influence of sea waves
CN114241364A (en) A rapid calibration method for foreign object targets in overhead transmission lines
CN116229052B (en) Method for detecting state change of substation equipment based on twin network
CN108537170A (en) A kind of power equipment firmware unmanned plane inspection pin missing detection method
CN114092478B (en) Anomaly detection method
CN116703895B (en) Small sample 3D visual detection method and system based on generation countermeasure network
CN109784396A (en) Method for identifying switching-on and switching-off states
CN112070837A (en) A method and system for positioning and grasping parts and components based on visual analysis
CN111242899A (en) Image-based flaw detection method and computer-readable storage medium
CN111199250A (en) A method and device for checking state of air switch in substation based on machine learning
CN113989196A (en) Vision-based earphone silica gel gasket appearance defect detection method
CN108427971A (en) The method and system of tobacco leaf grading based on mobile terminal
Hao et al. [Retracted] Fast Recognition Method for Multiple Apple Targets in Complex Occlusion Environment Based on Improved YOLOv5

Legal Events

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

Application publication date: 20190215