[go: up one dir, main page]

CN108665464A - A kind of foreign matter detecting method based on morphologic high tension electric tower and high-tension bus-bar - Google Patents

A kind of foreign matter detecting method based on morphologic high tension electric tower and high-tension bus-bar Download PDF

Info

Publication number
CN108665464A
CN108665464A CN201810287894.5A CN201810287894A CN108665464A CN 108665464 A CN108665464 A CN 108665464A CN 201810287894 A CN201810287894 A CN 201810287894A CN 108665464 A CN108665464 A CN 108665464A
Authority
CN
China
Prior art keywords
image
foreign matter
pixel
structural element
voltage
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
CN201810287894.5A
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.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
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 University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN201810287894.5A priority Critical patent/CN108665464A/en
Publication of CN108665464A publication Critical patent/CN108665464A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/155Segmentation; Edge detection involving morphological operators
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)

Abstract

本发明提供一种基于形态学的高压电塔及高压电线的异物检测方法,涉及电力设施异物检测领域,包括:步骤1:采集并读入高压电塔及高压电线的图像I1;步骤2:对图像I1进行分割得到二值图像I2;步骤3:对二值图像I2进行选取合适的形态学结构元素,寻找异物所在的粗略位置,得到图像I3;步骤4:对异物粗略位置进行边缘检测,找到异物的边缘轮廓,得到图像I4;步骤5:对图像I4进行形态学的填充后得到形态学填充后的图像I5;步骤6:对形态学填充后的图像I5依次逐层形态学检验,得到电力学设施异物数目和位置;步骤7:在原图中对应位置标记出所有的高压电塔及高压电线异物。本发明解决了目前高压电塔及高压电线异物检测的识别种类单一的问题。

The present invention provides a foreign object detection method based on morphology of high-voltage electric towers and high-voltage wires, which relates to the field of foreign object detection in electric power facilities, including: step 1: collecting and reading images I1 of high-voltage electric towers and high-voltage electric wires; 2: Segment the image I 1 to obtain the binary image I 2 ; Step 3: Select the appropriate morphological structural elements for the binary image I 2 , find the rough position of the foreign object, and obtain the image I 3 ; Step 4: The foreign object Perform edge detection at a rough position, find the edge contour of the foreign object, and obtain image I 4 ; step 5: perform morphological filling on image I 4 to obtain morphologically filled image I 5 ; step 6: morphologically filled image Step 15 checks layer by layer morphology successively to obtain the number and position of foreign objects in electrical facilities; Step 7: mark all high-voltage towers and high-voltage wire foreign objects in the corresponding positions in the original picture. The invention solves the problem that the identification types of foreign matter detection in high-voltage electric towers and high-voltage wires are single.

Description

一种基于形态学的高压电塔及高压电线的异物检测方法A foreign object detection method for high-voltage towers and high-voltage wires based on morphology

技术领域technical field

本发明涉及电力设施异物识别领域,特别涉及一种基于形态学的高压电塔及高压线异物检测方法。The invention relates to the field of foreign object identification of electric power facilities, in particular to a method for detecting foreign objects of high-voltage electric towers and high-voltage lines based on morphology.

背景技术Background technique

电力是我国能源的大动脉,而输电线路网则是电力传输的主要载体,维护输电线路正常运行显得尤为重要。搭建这些输电线路较为迅速,但是长期维护需要巨大的人力、财力和物力。近年来,各地因为风筝、气球等悬挂异物危及电网安全的事件屡见不鲜,输电线路悬挂诸如此类的异物会使高压电的极限放电距离缩短,甚至会造成大面积停电的严重后果。因此,及时识别出输电线路上的异物具有十分重要的意义。Electricity is the main artery of energy in our country, and the transmission line network is the main carrier of power transmission, so it is particularly important to maintain the normal operation of transmission lines. It is relatively quick to build these transmission lines, but long-term maintenance requires huge manpower, financial and material resources. In recent years, it is not uncommon for foreign objects such as kites and balloons to endanger the safety of the power grid in various places. Such foreign objects suspended on transmission lines will shorten the limit discharge distance of high-voltage electricity, and even cause serious consequences of large-scale power outages. Therefore, it is of great significance to identify foreign objects on the transmission line in time.

现有的输电线路异物排查主要为人工巡线,但是人工巡线存在安全隐患大,工作效率低,针对一些复杂地形的输电线路操作难度大等缺点。为了降低工作强度,提高工作效率,近几年出现了借助飞行器作为运载工具,装载可见光成像检测设备对110-1000kV高压输电线走廊进行巡检的方法,并应用计算机智能处理巡检带回的大量图像数据来判断线路上是否存在异物,此项技术能够极大地提高巡检技术的水平和效率,降低输电线路的维护成本,对创造更好的经济效益和社会效益有着重大意义。The existing inspection of foreign objects on transmission lines is mainly manual line inspection, but manual line inspection has the disadvantages of large safety hazards, low work efficiency, and difficult operation for some complex terrain transmission lines. In order to reduce work intensity and improve work efficiency, in recent years, there has been a method of inspecting 110-1000kV high-voltage transmission line corridors by using aircraft as a vehicle, loading visible light imaging detection equipment, and applying computer intelligence to process a large number of inspections brought back. Image data is used to judge whether there are foreign objects on the line. This technology can greatly improve the level and efficiency of inspection technology, reduce the maintenance cost of transmission lines, and have great significance for creating better economic and social benefits.

发明内容Contents of the invention

本发明的目的在于:为解决目前高压电塔及高压电线异物检测的方法识别的异物种类单一的问题,本发明提出了一种基于形态学的高压电塔及高压电线的异物检测方法。The purpose of the present invention is to solve the problem that the foreign object detection method of the current high-voltage electric tower and high-voltage wire detects a single type of foreign object, and the present invention proposes a foreign object detection method for high-voltage electric tower and high-voltage electric wire based on morphology.

本发明的技术方案如下:Technical scheme of the present invention is as follows:

一种基于形态学的高压电塔及高压电线的异物检测方法,包括以下步骤:A kind of foreign matter detection method of high-voltage electricity tower and high-voltage electric wire based on morphology, comprises the following steps:

步骤1:采集并读入高压电塔及高压电线的图像I1Step 1: Collect and read in the image I 1 of high-voltage towers and high-voltage wires;

步骤2:对图像I1进行分割得到二值图像I2Step 2: Segment image I 1 to obtain binary image I 2 ;

步骤3:对二值图像I2进行选取合适的形态学结构元素,寻找异物所在的粗略位置,得到图像I3Step 3: Select the appropriate morphological structural elements for the binary image I2 , find the rough position of the foreign matter, and obtain the image I3 ;

步骤4:对异物粗略位置进行边缘检测,找到异物的边缘轮廓,得到图像I4Step 4: Perform edge detection on the rough position of the foreign matter, find the edge contour of the foreign matter, and obtain the image I 4 ;

步骤5:对图像I4进行形态学的填充后得到形态学填充后的图像I5Step 5: performing morphological filling on the image I 4 to obtain a morphologically filled image I 5 ;

步骤6:对形态学填充后的图像I5依次逐层形态学检验,得到电力设施异物数目和位置;Step 6: Check the morphologically filled image I5 sequentially layer by layer to obtain the number and position of foreign objects in the power facility;

步骤7:在原图中对应位置标记出所有的高压电塔及高压电线异物。Step 7: Mark all high-voltage towers and foreign objects on high-voltage wires at the corresponding positions in the original picture.

具体地,所述步骤2中分割的方法为OTSU分割法,具体步骤如下:Specifically, the method of segmentation in the step 2 is the OTSU segmentation method, and the specific steps are as follows:

步骤21:设原始图像I1的像素点数为M,灰度级为i的像素点数为ni,对灰度直方图进行归一化,灰度为i的像素点概率为piStep 21: Set the number of pixels of the original image I 1 as M, the number of pixels with gray level i as n i , normalize the gray level histogram, and the probability of the pixel with gray level i as p i :

pi=ni/Mp i =n i /M

步骤22:假设L为原始图像I1的灰度级数,k为其灰度级数阈值,选取阈值 T(k)=k,并使用它把原始图像I1总像素点阈值化分成c1和c2两类像素,P为该类像素出现的概率;对于两类像素c1和c2,每一类出现的概率分别为P1(k),P2(k):Step 22: Suppose L is the gray level of the original image I 1 , k is its gray level threshold, select the threshold T(k)=k, and use it to threshold the total pixels of the original image I 1 into c 1 and c 2 two types of pixels, P is the probability of occurrence of this type of pixel; for two types of pixels c 1 and c 2 , the probability of occurrence of each type is P 1 (k), P 2 (k):

分配到c1和c2的像素的平均灰度值分别为m1,m2The average gray value of the pixels assigned to c 1 and c 2 are m 1 , m 2 :

式中,C1为c1类像素的像素个数,C2为c2类像素的像素个数,In the formula , C1 is the number of pixels of c1 type pixels, C2 is the number of pixels of c2 type pixels,

整个图像I1的全局灰度均值为:The global gray mean of the entire image I 1 is:

为类间方差,定义为: is the between-class variance, defined as:

最佳阈值是k*,然后最大化间类方差 The best threshold is k*, then maximize the inter-class variance

到此,确定阈值k*,将原始图像I1分为c1和c2两个部分,将全部c1类像素转化为灰度级为0的像素点,将全部c2类像素转化为灰度级数为1的像素点,使原始图像I1转化为二值图像I2,完成OTSU阈值分割。At this point, the threshold k* is determined, the original image I 1 is divided into two parts c 1 and c 2 , all c 1 type pixels are converted into pixels with a gray level of 0, and all c 2 type pixels are converted into gray The pixels whose degree series is 1 convert the original image I 1 into a binary image I 2 and complete the OTSU threshold segmentation.

具体地,所述步骤3的具体步骤如下:Specifically, the specific steps of the step 3 are as follows:

步骤31:假设圆盘型结构元素为S,其半径R大小的初始大小为r,并且其半径R随着结构元素S再次使用时增大,腐蚀后图像为E,二值图像为I2Step 31: Assuming that the disc-shaped structural element is S, the initial size of its radius R is r, and its radius R increases as the structural element S is used again, the image after corrosion is E, and the binary image is I 2 ;

利用结构元素S扫描二值图像,用结构元素与其覆盖的二值图像I2做“与”操作如果都为1,结果腐蚀后图像E的该像素为1,否则为0;Use the structural element S to scan the binary image, and use the structural element and the binary image I 2 covered by the "AND" operation. If both are 1, the pixel of the corroded image E is 1, otherwise it is 0;

利用腐蚀将二值图像I2按照圆盘型结构元素S的半径R进行腐蚀缩减,使间隔空隙得到剔除,并使二值图像I2的图像腐蚀缩小,剔除腐蚀电力设施的部分结构,同时也对电力设施异物进行腐蚀缩减;若圆盘型结构元素S再次使用时,随着其半径R大小增大,增大二值图像I2间隔空隙的剔除和二值图像I2的图像腐蚀缩小能力;Use corrosion to corrode and reduce the binary image I 2 according to the radius R of the disc-shaped structural element S, so that the gaps can be eliminated, and the image corrosion of the binary image I 2 can be reduced, and part of the structure of the corroded power facility can be removed, and at the same time Corrosion and reduction of foreign objects in power facilities; if the disc-shaped structural element S is used again, as the size of its radius R increases, the ability to eliminate the space between the binary image I 2 and the image corrosion reduction of the binary image I 2 will be increased ;

步骤32:假设腐蚀后图像为E,并以步骤31的圆盘型结构元素S,对图像E 进行膨胀得到图像I3Step 32: Assume that the image after etching is E, and use the disk-shaped structural element S in step 31 to expand the image E to obtain an image I 3 ;

利用圆盘型结构元素S扫描二值图像,用结构元素与其覆盖的二值图像I2做“或”操作如果都为0,结果膨胀后图像I3的该像素为0,否则为1;Use the disk-shaped structural element S to scan the binary image, and use the structural element and the binary image I 2 covered by the "OR" operation. If both are 0, the pixel of the expanded image I 3 will be 0, otherwise it will be 1;

利用膨胀将腐蚀后的图像E用相同的圆盘型结构元素S对腐蚀后的电力设施异物的大小形状进行按照圆盘型结构元素S的半径R扩张复原,得到膨胀后图像 I3;若圆盘型结构元素S再次使用时,随着其半径R大小增大,增大腐蚀后对图像的复原能力图像大小得到复原,图像经过腐蚀膨胀处理后剔除部分电力设施部分结构和背景后,得到粗略的电力设施异物位置。Utilize expansion to expand the corroded image E with the same disc-shaped structural element S to restore the size and shape of the corroded power facility foreign matter according to the radius R of the disc-shaped structural element S, and obtain the expanded image I 3 ; if the circle When the disk-shaped structural element S is used again, as its radius R increases, the restoration ability of the image after corrosion is increased. The size of the image is restored. The location of foreign objects in the power facilities.

具体地,所述步骤4的具体步骤如下:Specifically, the specific steps of the step 4 are as follows:

步骤41:对图像I3进行高斯滤波,具体为:Step 41: Perform Gaussian filtering on image I 3 , specifically:

假设二维核向量为K,方差为σ,图像I3的像素横纵坐标为x,y,确定参数得到二维核向量K;Assuming that the two-dimensional kernel vector is K, the variance is σ, the horizontal and vertical coordinates of the pixel of image I3 are x, y, and the parameters are determined to obtain the two-dimensional kernel vector K;

上式为离散化的二维高斯函数,确定参数得到二维核向量后进行图像高斯滤波,使待滤波的像素点及其邻域点的灰度值进行加权平均;The above formula is a discretized two-dimensional Gaussian function. After determining the parameters and obtaining the two-dimensional kernel vector, the image Gaussian filter is performed, so that the gray value of the pixel to be filtered and its neighborhood points is weighted and averaged;

步骤42:用图像在x和y方向上偏导数的两个矩阵sx和sy得到一阶偏导的有限差分,关于图像灰度值的梯度使用一阶有限差分进行近似:Step 42: Use the two matrices s x and s y of the partial derivatives of the image in the x and y directions to obtain the finite difference of the first-order partial derivative, and use the first-order finite difference to approximate the gradient of the gray value of the image:

并使用一阶偏导的有限差分来计算图像I3梯度的幅值M和方向θ;And use the finite difference of the first-order partial derivative to calculate the magnitude M and direction θ of the image I 3 gradient;

步骤43:利用梯度的幅值M和方向θ,对梯度幅值进行非极大值抑制,寻找像素点局部最大值,将非极大值点所对应的灰度值置为0,当前位置的梯度值与梯度方向上两侧的梯度值进行比较和梯度方向垂直于边缘方向;完成非极大值抑制后得到一个二值图像,非边缘的点灰度值均为0,可能为边缘的局部灰度极大值点灰度为128;Step 43: Use the magnitude M and direction θ of the gradient to suppress the non-maximum value of the gradient magnitude, find the local maximum value of the pixel, set the gray value corresponding to the non-maximum value point to 0, and the current position The gradient value is compared with the gradient value on both sides of the gradient direction and the gradient direction is perpendicular to the edge direction; a binary image is obtained after non-maximum suppression is completed, and the gray value of non-edge points is 0, which may be a local edge The gray value of the maximum gray point is 128;

步骤44:用双阈值算法检测和连接边缘,选择两个阈值,根据高阈值得到一个边缘图像,在高阈值图像中把边缘链接成轮廓,当到达轮廓的端点时,在断点的8邻域点中寻找满足低阈值的点,再根据此点收集新的边缘,直到整个图像边缘闭合,得到canny算子边缘检测后图像I4Step 44: Use the double-threshold algorithm to detect and connect edges, select two thresholds, get an edge image according to the high threshold, link the edges into contours in the high-threshold image, when reaching the endpoint of the contour, in the 8 neighborhood of the breakpoint Find the point that satisfies the low threshold among the points, and then collect new edges based on this point until the edge of the entire image is closed, and the image I 4 after edge detection by the canny operator is obtained.

具体地,所述步骤6的具体步骤如下:Specifically, the specific steps of the step 6 are as follows:

步骤61:对步骤5所得图像I5进行所有连通区域的面积统计,得到连通区域的面积最大值和最小值,并计算连通区域的圆形度;Step 61: Perform area statistics of all connected regions on the image I5 obtained in step 5 , obtain the maximum and minimum areas of the connected regions, and calculate the circularity of the connected regions;

步骤62:判断连通区域最大面积是否都等于0,如果是,并进入步骤7,否则则进入步骤63;Step 62: Judging whether the maximum area of the connected region is equal to 0, if yes, proceed to step 7, otherwise proceed to step 63;

步骤63:判断连通区域的面积最大值和连通区域的面积最小值的比值是否属于正常范围,若是,则进入步骤64,否则,则返回步骤3;Step 63: judging whether the ratio of the maximum area of the connected region to the minimum area of the connected region belongs to the normal range, if so, proceed to step 64, otherwise, return to step 3;

步骤64:判断所有异物的圆形度是否属于正常范围,若是,则进入步骤65,否则,则返回步骤3;Step 64: Judging whether the circularity of all foreign objects belongs to the normal range, if so, proceed to step 65, otherwise, return to step 3;

步骤65:判断连通区域的面积最小值是否属于正常范围,若是,则进入步骤66,否则,则返回步骤3;Step 65: Judging whether the minimum area of the connected region belongs to the normal range, if so, proceed to step 66, otherwise, return to step 3;

步骤66:判断连通区域的面积最大值是否属于正常范围,若是,则进入步骤67,否则,则返回步骤3;Step 66: Judging whether the maximum area of the connected region belongs to the normal range, if so, proceed to step 67, otherwise, return to step 3;

步骤67:判断异物个数是否属于正常范围,若是,则进入步骤68,否则,则返回步骤3。Step 67: Determine whether the number of foreign objects belongs to the normal range, if so, go to step 68, otherwise, go back to step 3.

步骤68:统计最终确定的高压电塔及高压电线中异物的数目和位置。Step 68: Counting the number and position of foreign objects in the final determined high-voltage towers and high-voltage wires.

具体地,所述步骤7的具体步骤如下:Specifically, the specific steps of the step 7 are as follows:

步骤71:获取异物区域质心坐标,存入数组用作最终定位;Step 71: Obtain the coordinates of the center of mass of the foreign object area and store them in an array for final positioning;

步骤72:获取异物区域的轮廓位置后,将此位置信息用于原图,通过修改相应位置的灰度值,将其变为涂色标记区域。Step 72: After obtaining the contour position of the foreign object area, use this position information in the original image, and change the gray value of the corresponding position into a painted marked area.

进一步地,所述步骤2中,在对图像I1进行分割得到二值图像I2之前,先对图像I1进行RGB图像的B通道提取处理。Further, in the step 2 , before the image I1 is segmented to obtain the binary image I2, the image I1 is subjected to B-channel extraction processing of the RGB image.

综上所述,与现有技术相比,由于采用了上述技术方案,本发明的有益效果是:In summary, compared with the prior art, due to the adoption of the above-mentioned technical solution, the beneficial effects of the present invention are:

(1)本发明对高压电塔和高压电缆上检测异物的类型多,具体的和现有技术的检测类型的对比参见具体实施方式中的表格及其说明。(1) The present invention detects many types of foreign objects on high-voltage electric towers and high-voltage cables. For a specific comparison with the detection types of the prior art, please refer to the table and its description in the specific embodiment.

(2)本发明的基于形态学对高压电塔和高压电缆异物识别方法,由于高压电塔和高压电缆的图像结构特殊,除了异物外,都是由交错的直线元素组成,其他场景的异物检测方法并不适用于本发明的场景,如果采用其他检测方法来适用于本发明的场景,识别效果非常不好,本发明可以贴合异物标记,而其他场景的方法运用于电力设施异物识别并无此特点,甚至无法定位异物。(2) The method for identifying foreign objects in high-voltage electric towers and high-voltage cables based on morphology of the present invention, because the image structures of high-voltage electric towers and high-voltage cables are special, except for foreign objects, they are all composed of staggered linear elements, and other scenes The foreign object detection method is not applicable to the scene of the present invention. If other detection methods are used to apply to the scene of the present invention, the recognition effect is very bad. The present invention can be attached to the foreign object mark, and the method of other scenarios is applied to the foreign object recognition of power facilities Without this feature, it is even impossible to locate foreign objects.

(3)异物附在高压电塔和高压电缆周围时会对原有结构造成破坏,利用形态学的结构元素配合闭运算剔除原有的高压电塔和高压电缆背景,可以极快检验图像中的高压电塔及高压电线异物数目和高压电塔及高压电线异物位置,并且不会对原有异物的形状造成破坏,对后续的标记达到了完美还原异物的显示,让结果更直观地显示于图像上面,对后续的排除高压电塔及高压电线异物的工作也对高压电塔及高压电线异物有更快速的识别。(3) When foreign matter is attached to the high-voltage tower and high-voltage cable, it will cause damage to the original structure. Using morphological structural elements and closed operations to remove the original high-voltage tower and high-voltage cable background, the image can be inspected very quickly The number of foreign objects in high-voltage towers and high-voltage wires and the position of foreign objects in high-voltage electricity towers and high-voltage wires will not damage the shape of the original foreign objects, and the subsequent marks can perfectly restore the display of foreign objects, making the results more intuitive It is clearly displayed on the image, and the follow-up work of removing foreign objects from high-voltage power towers and high-voltage wires also enables faster identification of foreign objects from high-voltage power towers and high-voltage wires.

(4)本发明的基于形态学对高压电塔和高压电缆异物识别方法,采集了大量样本,研究高压电塔及高压电线异物进一步的判断和筛选范围,对高压电塔和高压电缆的异物最大面积和最小面积及圆形度等一系列条件进行筛选,让本发明的异物识别率得到大幅度的上升,结合现代特色,达到良好的实验效果。(4) Based on morphology of the present invention, a large number of samples have been collected to study the further judgment and screening range of foreign objects in high-voltage electric towers and high-voltage cables. For high-voltage electric towers and high-voltage cables A series of conditions such as the maximum and minimum area of the foreign matter and circularity are screened, so that the foreign matter recognition rate of the present invention is greatly increased, combined with modern features, to achieve good experimental results.

(5)本发明的基于形态学对高压电塔以及高压线异物的识别方法,利用最主要的背景图片天空,而当天空处于深蓝色的时候,会对其他的处理方法有着最较大偏差影响,但本发明图像经过提取RGB通道的B通道,可以极大幅度的提升了阈值处理后所得图像的识别率,并对高压电塔和高压电缆的周围环境依靠降低,降低了获取图像数据的成本和技术,大大满足了巡检图像对异物检测识别的需求。(5) The morphology-based method for identifying foreign objects on high-voltage towers and high-voltage lines of the present invention uses the sky as the most important background picture, and when the sky is in dark blue, it will have the largest deviation impact on other processing methods , but the image of the present invention extracts the B channel of the RGB channel, which can greatly improve the recognition rate of the image obtained after threshold processing, and reduces the dependence on the surrounding environment of high-voltage electric towers and high-voltage cables, reducing the cost of obtaining image data The cost and technology greatly meet the needs of inspection images for foreign object detection and recognition.

附图说明Description of drawings

了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。通过附图所示,本发明的上述及其它目的、特征和优势将更加清晰。在全部附图中相同的附图标记指示相同的部分。并未刻意按实际尺寸等比例缩放绘制附图,重点在于示出本发明的主旨。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required in the embodiments. Obviously, the accompanying drawings in the following description are only some of the present invention. Embodiments, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort. The above and other objects, features and advantages of the present invention will be more clearly illustrated by the accompanying drawings. Like reference numerals designate like parts throughout the drawings. The drawings are not intentionally scaled according to the actual size, and the emphasis is on illustrating the gist of the present invention.

图1为本发明的流程示意图;Fig. 1 is a schematic flow sheet of the present invention;

图2为本发明的初始图像;Fig. 2 is initial image of the present invention;

图3为本发明中OTSU阈值分割图;Fig. 3 is OTSU threshold segmentation figure among the present invention;

图4为标记圆形度的闭运算和形态学限制运算结果图;Fig. 4 is the result figure of closing operation and morphological restriction operation of marking circularity;

图5为识别结果图;Fig. 5 is the figure of recognition result;

图6为程序运行结果图;Figure 6 is a diagram of the program running results;

图7为本发明中不进行B通道提取而直接进行阈值分割的图像;Fig. 7 is the image that directly carries out threshold segmentation without carrying out B channel extraction among the present invention;

图8为本发明中进行B通道提取再进行阈值分割后的图像;Fig. 8 is the image after performing B channel extraction in the present invention and then performing threshold segmentation;

图9为本发明中识别的一鸟巢原图;Fig. 9 is an original picture of a bird's nest identified in the present invention;

图10为本发明中安徽继远软件公司采用的方法对图9的识别标记结果图;Fig. 10 is the result figure of the identification mark of Fig. 9 by the method that Anhui Jiyuan Software Company adopts in the present invention;

图11为本发明中采用本发明的方法对图9的识别标记结果图;Fig. 11 adopts the method of the present invention in the present invention to the identification mark result figure of Fig. 9;

图12为发明中识别的一风筝原图;Figure 12 is the original picture of a kite identified in the invention;

图13为本发明中采用本发明的方法对图12的识别标记结果图;Fig. 13 adopts the method of the present invention in the present invention to the identification mark result figure of Fig. 12;

图14发明中识别的一气球原图;Figure 14 The original picture of a balloon identified in the invention;

图15为本发明中采用本发明的方法对图14的识别标记结果图。Fig. 15 is a diagram of the recognition mark result of Fig. 14 by using the method of the present invention in the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

如图1所示,本发明的一种基于形态学的高压电塔及高压电线异物检测方法,如图1所示,包括以下步骤:As shown in Figure 1, a kind of morphology-based high-voltage electric tower and high-voltage wire foreign object detection method of the present invention, as shown in Figure 1, comprises the following steps:

步骤1:采集并读入电力设施的图像I1,如图2所示。Step 1: Collect and read the image I 1 of the power facility, as shown in Fig. 2 .

步骤2:对图像I1进行RGB图像的B通道提取,然后采用OTSU分割法分割图像得到二值图像I2,如图3所示,具体为:Step 2: Extract the B channel of the RGB image on the image I 1 , and then use the OTSU segmentation method to segment the image to obtain a binary image I 2 , as shown in Figure 3, specifically:

步骤21:设原始图像I1的像素点数为M,灰度级为i的像素点数为ni,对灰度直方图进行归一化,灰度为i的像素点概率为piStep 21: Set the number of pixels of the original image I 1 as M, the number of pixels with gray level i as n i , normalize the gray level histogram, and the probability of the pixel with gray level i as p i :

pi=ni/Mp i =n i /M

步骤22:假设L为原始图像I1的灰度级数,k为其灰度级数阈值,选取阈值 T(k)=k,并使用它把原始图像I1总像素点阈值化分成c1和c2两类像素,P为该类像素出现的概率;对于两类像素c1和c2,每一类出现的概率分别为P1(k),P2(k):Step 22: Suppose L is the gray level of the original image I 1 , k is its gray level threshold, select the threshold T(k)=k, and use it to threshold the total pixels of the original image I 1 into c 1 and c 2 two types of pixels, P is the probability of occurrence of this type of pixel; for two types of pixels c 1 and c 2 , the probability of occurrence of each type is P 1 (k), P 2 (k):

分配到c1和c2的像素的平均灰度值分别为m1,m2The average gray value of the pixels assigned to c 1 and c 2 are m 1 , m 2 :

式中,C1为c1类像素的像素个数,C2为c2类像素的像素个数;In the formula , C1 is the number of pixels of c1 type pixels, and C2 is the number of pixels of c2 type pixels;

整个图像I1的全局均值为:The global mean of the entire image I1 is:

为类间方差,定义为: is the between-class variance, defined as:

从而最佳阈值是k*,最大化间类方差 Thus the optimal threshold is k*, maximizing the inter-class variance

到此,确定阈值k*,将原始图像I1分为c1和c2两个部分,将全部c1类像素转化为灰度级为0的像素点,将全部c2类像素转化为灰度级数为1的像素点,使原始图像I1转化为二值图像I2,完成OTSU阈值分割。At this point, the threshold k* is determined, the original image I 1 is divided into two parts c 1 and c 2 , all c 1 type pixels are converted into pixels with a gray level of 0, and all c 2 type pixels are converted into gray The pixels whose degree series is 1 convert the original image I 1 into a binary image I 2 and complete the OTSU threshold segmentation.

步骤3:对二值图像I2进行选取合适的形态学结构元素,寻找异物所在的粗略位置,得到图像I3,具体步骤如下:Step 3: Select the appropriate morphological structural elements for the binary image I 2 , find the rough position of the foreign object, and obtain the image I 3 , the specific steps are as follows:

步骤31:假设圆盘型结构元素为S,其半径R大小的初始大小为r,并且其半径R随着结构元素S再次使用时增大,腐蚀后图像为E,二值图像为I2Step 31: Assuming that the disk-shaped structural element is S, the initial size of its radius R is r, and its radius R increases as the structural element S is used again, the image after erosion is E, and the binary image is I 2 .

利用结构元素S扫描二值图像,用结构元素与其覆盖的二值图像I2做“与”操作如果都为1,结果腐蚀后图像E的该像素为1。否则为0。Use the structural element S to scan the binary image, and use the structural element and the binary image I 2 covered by the "AND" operation. If both are 1, the pixel of the corroded image E will be 1. Otherwise 0.

则利用腐蚀将二值图像I2按照圆盘型结构元素S的半径R进行腐蚀缩减,使间隔空隙得到剔除,并使二值图像I2的图像腐蚀缩小,即剔除腐蚀电力设施的部分结构,同时也对电力设施异物进行腐蚀缩减。若圆盘型结构元素S再次使用时,随着其半径R大小增大,增大二值图像I2间隔空隙的剔除和二值图像I2的图像腐蚀缩小能力。Then use corrosion to corrode and reduce the binary image I 2 according to the radius R of the disc-shaped structural element S, so that the interval gaps can be removed, and the image corrosion of the binary image I 2 can be reduced, that is, part of the structure of the corroded power facility can be removed. At the same time, it also reduces the corrosion of foreign objects in power facilities. If the disk-shaped structural element S is used again, as its radius R increases, the ability to eliminate gaps in the binary image I 2 and image erosion and reduction in the binary image I 2 will increase.

结构元素,所谓结构元素是指具有某种确定形状的基本结构,它的选择一般要求其具有旋转不变性或者镜像不变性,使结构元素的原点在其几何中心处,周围像素关于原点对称。Structural element, the so-called structural element refers to the basic structure with a certain shape, and its selection generally requires that it has rotation invariance or mirror invariance, so that the origin of the structural element is at its geometric center, and the surrounding pixels are symmetrical about the origin.

步骤32:假设腐蚀后图像为E,并以步骤31的圆盘型结构元素S,对图像E 进行膨胀得到图像I3Step 32: Assume that the image after etching is E, and use the disk-shaped structural element S in step 31 to expand the image E to obtain an image I 3 .

利用圆盘型结构元素S扫描二值图像,用结构元素与其覆盖的二值图像I2做“或”操作如果都为0,结果膨胀后图像I3的该像素为0。否则为1。Use the disk-shaped structural element S to scan the binary image, and use the structural element and the binary image I 2 covered by the "OR" operation. If both are 0, the pixel of the expanded image I 3 will be 0. 1 otherwise.

则利用膨胀将腐蚀后的图像E用相同的圆盘型结构元素S对腐蚀后的电力设施异物的大小形状进行按照圆盘型结构元素S的半径R扩张复原,得到膨胀后图像I3。若圆盘型结构元素S再次使用时,随着其半径R大小增大,增大腐蚀后对图像的复原能力图像大小得到复原。图像经过腐蚀膨胀处理后剔除部分电力设施部分结构和背景后,得到粗略的电力设施异物位置。Then use expansion to expand and restore the corroded image E with the same disc-shaped structural element S according to the radius R of the disc-shaped structural element S to obtain the expanded image I 3 . If the disk-shaped structural element S is used again, as its radius R increases, the restoration ability of the image after corrosion is increased, and the image size is restored. After the image is corroded and dilated, part of the structure and background of the power facility is removed, and a rough location of foreign objects in the power facility is obtained.

步骤4:对步骤4得到的图像进行canny算子边缘检测,得到异物或其余干扰物的边缘轮廓。步骤4具体为:Step 4: Perform canny operator edge detection on the image obtained in step 4 to obtain the edge profile of foreign objects or other interference objects. Step 4 is specifically:

假设二维核向量为K,方差为σ,图像I3的像素横纵坐标为x,y,确定参数得到二维核向量K;Assuming that the two-dimensional kernel vector is K, the variance is σ, the horizontal and vertical coordinates of the pixel of image I3 are x, y, and the parameters are determined to obtain the two-dimensional kernel vector K;

上式为离散化的二维高斯函数,确定参数得到二维核向量后进行图像高斯滤波,使待滤波的像素点及其邻域点的灰度值进行加权平均。The above formula is a discretized two-dimensional Gaussian function. After determining the parameters and obtaining the two-dimensional kernel vector, the image Gaussian filter is performed, so that the gray value of the pixel to be filtered and its neighborhood points is weighted and averaged.

步骤42:用图像在x和y方向上偏导数的两个矩阵sx和sy得到一阶偏导的有限差分,关于图像灰度值的梯度使用一阶有限差分进行近似:Step 42: Use the two matrices s x and s y of the partial derivatives of the image in the x and y directions to obtain the finite difference of the first-order partial derivative, and use the first-order finite difference to approximate the gradient of the gray value of the image:

并使用一阶偏导的有限差分来计算图像I3梯度的幅值M和方向θ。And use the finite difference of the first order partial derivative to calculate the magnitude M and direction θ of the image I 3 gradient.

步骤43:利用梯度的幅值M和方向θ,对梯度幅值进行非极大值抑制,寻找像素点局部最大值,将非极大值点所对应的灰度值置为0,当前位置的梯度值与梯度方向上两侧的梯度值进行比较和梯度方向垂直于边缘方向;完成非极大值抑制后得到一个二值图像,非边缘的点灰度值均为0,可能为边缘的局部灰度极大值点灰度为128;Step 43: Use the magnitude M and direction θ of the gradient to suppress the non-maximum value of the gradient magnitude, find the local maximum value of the pixel, set the gray value corresponding to the non-maximum value point to 0, and the current position The gradient value is compared with the gradient value on both sides of the gradient direction and the gradient direction is perpendicular to the edge direction; a binary image is obtained after non-maximum suppression is completed, and the gray value of non-edge points is 0, which may be a local edge The gray value of the maximum gray point is 128;

步骤44:用双阈值算法检测和连接边缘,选择两个阈值,根据高阈值得到一个边缘图像,在高阈值图像中把边缘链接成轮廓,当到达轮廓的端点时,在断点的8邻域点中寻找满足低阈值的点,再根据此点收集新的边缘,直到整个图像边缘闭合,得到canny算子边缘检测后图像I4Step 44: Use the double-threshold algorithm to detect and connect edges, select two thresholds, get an edge image according to the high threshold, link the edges into contours in the high-threshold image, when reaching the endpoint of the contour, in the 8 neighborhood of the breakpoint Find the point that satisfies the low threshold among the points, and then collect new edges based on this point until the edge of the entire image is closed, and the image I 4 after edge detection by the canny operator is obtained.

步骤5:对图像I4进行形态学的填充后得到形态学填充后的图像I5Step 5: Perform morphological filling on the image I 4 to obtain a morphologically filled image I 5 .

步骤6:对形态学填充后的图像I5依次逐层形态学检验,得到电力学设施异物数目和位置。Step 6: The morphologically filled image I 5 is sequentially inspected layer by layer to obtain the number and position of foreign objects in the electrical facility.

步骤6:在原图中对应位置标记出所有的电力设施异物。此步骤完成后,结果图如图4所示。Step 6: Mark all the foreign objects of the power facilities at the corresponding positions in the original picture. After this step is completed, the resulting graph is shown in Figure 4.

步骤61:对步骤5所得图像I5进行所有连通区域的面积统计,得到连通区域的面积最大值和最小值,并计算连通区域的圆形度;Step 61: Perform area statistics of all connected regions on the image I5 obtained in step 5 , obtain the maximum and minimum areas of the connected regions, and calculate the circularity of the connected regions;

步骤62:判断连通区域最大面积是否都等于0,如果是,并进入步骤7,否则则进入步骤63;Step 62: Judging whether the maximum area of the connected region is equal to 0, if yes, proceed to step 7, otherwise proceed to step 63;

步骤63:判断连通区域的面积最大值和连通区域的面积最小值的比值是否属于正常范围,即面积最大值和连通区域的面积最小值的比值是否小于3倍,若是,则进入步骤64,否则,则返回步骤3;Step 63: Determine whether the ratio of the maximum area value of the connected region to the minimum area value of the connected region belongs to the normal range, that is, whether the ratio of the maximum area value to the minimum area value of the connected region is less than 3 times, if so, then enter step 64, otherwise , return to step 3;

步骤64:判断所有异物的圆形度是否属于正常范围,即所有异物的圆形度是否为0.5到0.8,若是,则进入步骤65,否则,则返回步骤3;Step 64: Judging whether the circularity of all foreign objects belongs to the normal range, that is, whether the circularity of all foreign objects is 0.5 to 0.8, if yes, proceed to step 65, otherwise, return to step 3;

步骤65:判断连通区域的面积最小值是否属于正常范围,即连通区域的面积最小值是否小于原图像I1面积的千分之一内,若是,则进入步骤66,否则,则返回步骤3;Step 65: Determine whether the minimum area of the connected region belongs to the normal range, that is, whether the minimum area of the connected region is less than one-thousandth of the area of the original image I1 , if so, then enter step 66, otherwise, return to step 3;

步骤66:判断连通区域的面积最大值是否属于正常范围,即连通区域的面积最大值是否大于原图像面积的七百五十分之一,若是,则进入步骤67,否则,则返回步骤3;Step 66: Determine whether the maximum area of the connected region belongs to the normal range, that is, whether the maximum area of the connected region is greater than 1/750 of the area of the original image, if so, enter step 67, otherwise, return to step 3;

步骤67:判断异物个数是否属于正常范围,即异物个数是否小于六个,若是,则进入步骤68,否则,则返回步骤3。Step 67: Determine whether the number of foreign objects belongs to the normal range, that is, whether the number of foreign objects is less than six, if so, go to step 68, otherwise, go back to step 3.

步骤68:统计最终确定的高压电塔及高压电线中异物的数目和位置。Step 68: Counting the number and position of foreign objects in the final determined high-voltage towers and high-voltage wires.

步骤7:在原图中对应位置标记出所有的高压电塔及高压电线异物。具体包括:Step 7: Mark all high-voltage towers and foreign objects on high-voltage wires at the corresponding positions in the original picture. Specifically include:

步骤71:对原图中对应有高压电塔及高压电线异物的位置进行质心定位,获取异物质心坐标,存入数组作为最终定位。Step 71: Locate the centroid of the position corresponding to the foreign matter of the high-voltage electric tower and high-voltage wire in the original image, obtain the coordinates of the center of the foreign matter, and store it in an array as the final position.

步骤72:获取异物的轮廓位置,将此轮廓位置用于原图,通过修改原图中异物相应位置的灰度值,将其变为涂色标记。此步骤完成后,结果如图5所示。Step 72: Obtain the contour position of the foreign matter, use this contour position in the original image, and change the gray value of the corresponding position of the foreign matter in the original image into a colored mark. After this step is completed, the result is shown in Figure 5.

在步骤7完成后,具体实施中为了更方便统计,还应该对数据进行封装和进行界面化设计,最终在独立应用界面上进行展示,方面图像筛选,如图6所示。此步骤为本领域技术人员公知的技术,在此不做过多说明。After step 7 is completed, in order to make statistics more convenient in the specific implementation, the data should also be packaged and interface designed, and finally displayed on the independent application interface, in terms of image screening, as shown in Figure 6. This step is well known to those skilled in the art, and will not be described in detail here.

本发明对高压电塔和高压电缆上检测异物的类型多,具体的对比表格如表1 所示。图10是安徽继远软件公司采用的方法对图9中鸟巢的识别效果图,图10 中可以看见,该图中只是进行了简单地线条标记,标记粗糙,而图11是对图9 的识别效果图,可以看见,图11中对鸟巢的标记准确地覆盖在了鸟巢上,检测效果非常好。图2和图5为本发明针对另一鸟巢的检测原图和结果图。图12和图13是本发明针对风筝的识别原图和效果图,图14和图15是本发明针对气球的识别效果图和原图。The present invention detects many types of foreign matter on high-voltage electric towers and high-voltage cables, and the specific comparison table is shown in Table 1. Figure 10 is the identification effect diagram of the bird's nest in Figure 9 by the method adopted by Anhui Jiyuan Software Company. It can be seen in Figure 10 that only simple line marking is carried out in this figure, and the marking is rough, while Figure 11 is the identification of Figure 9 In the effect picture, it can be seen that the mark of the bird's nest in Figure 11 is accurately covered on the bird's nest, and the detection effect is very good. Fig. 2 and Fig. 5 are the detection original picture and result picture of another bird's nest according to the present invention. Fig. 12 and Fig. 13 are the original and effect diagrams of kite recognition according to the present invention, and Fig. 14 and Fig. 15 are the effect diagram and original diagram of balloon recognition according to the present invention.

表1Table 1

本发明的基于形态学对高压电塔和高压电缆异物识别方法,采集了大量样本,研究高压电塔及高压电线异物进一步的判断和筛选范围,对高压电塔和高压电缆的异物最大面积和最小面积及圆形度等一系列条件进行筛选,让本发明的异物识别率得到大幅度的上升,结合现代特色,达到良好的实验效果,具体结果图标2 所示。The method for identifying foreign objects in high-voltage electric towers and high-voltage cables based on morphology of the present invention collects a large number of samples to study the further judgment and screening range of foreign objects in high-voltage electric towers and high-voltage electric wires. A series of conditions such as area, minimum area and circularity are screened, so that the foreign object recognition rate of the present invention is greatly increased, combined with modern features, a good experimental effect is achieved, and the specific results are shown in icon 2.

表2Table 2

异物类型Foreign body type 样本数量Number of samples 准确率Accuracy 鸟巢the bird's nest 7676 97.4%97.4% 风筝Kite 21twenty one 95.2%95.2% 气球balloon 24twenty four 100%100% 无异物No foreign matter 114114 96.9%96.9% 有异物foreign body 121121 97.5% 97.5%

值得说明的是,本发明的基于形态学对高压电塔以及高压线异物的识别方法,利用最主要的背景图片天空,天空的颜色有时为灰色,有时为浅蓝色,有时为深蓝色,为了更加优选地实施本发明,当天空处于深蓝色的时候,如果不对原始图像进行B通道提取,最终的结果会如图8所示,而采用本发明的方法将图像经过提取RGB通道的B通道后,最终结果如图9所示,可以极大幅度的提升了阈值处理后所得图像的识别率,并对高压电塔和高压电缆的周围环境依靠降低,降低了获取图像数据的成本和技术,大大满足了巡检图像对异物检测识别的需求。It is worth noting that the morphology-based recognition method for foreign objects on high-voltage electric towers and high-voltage lines of the present invention uses the sky as the most important background image. The color of the sky is sometimes gray, sometimes light blue, and sometimes dark blue. More preferably implement the present invention, when the sky is dark blue, if the B channel is not extracted from the original image, the final result will be as shown in Figure 8, and the method of the present invention is used to extract the image after the B channel of the RGB channel , the final result is shown in Figure 9, which can greatly improve the recognition rate of the image obtained after threshold processing, and reduce the dependence on the surrounding environment of high-voltage power towers and high-voltage cables, reducing the cost and technology of image data acquisition, It greatly meets the needs of inspection images for foreign object detection and recognition.

Claims (7)

1. a kind of foreign matter detecting method based on morphologic high tension electric tower and high-tension bus-bar, which is characterized in that including following step Suddenly:
Step 1:Acquire and read in the image I of high tension electric tower and high-tension bus-bar1
Step 2:To image I1It is split to obtain bianry image I2
Step 3:To bianry image I2It carries out choosing suitable morphological structuring elements, finds the rough position where foreign matter, obtain Image I3
Step 4:Edge detection is carried out to foreign matter rough position, the edge contour of foreign matter is found, obtains image I4
Step 5:To image I4The image I after morphology filling is obtained after carrying out morphologic filling5
Step 6:Image I after being filled to morphology5Successively morphological examination successively, obtains electric power facility foreign matter number and location;
Step 7:Corresponding position marks all high tension electric towers and high-tension bus-bar foreign matter in artwork.
2. a kind of and morphologic high tension electric tower and high-tension bus-bar foreign matter detecting method according to claim 1, feature It is, the method divided in the step 2 is OTSU split plot designs, is as follows:
Step 21:If original image I1Pixel number be M, the pixel number that gray level is i is ni, grey level histogram is carried out Normalization, the pixel probability that gray scale is i is pi
pi=ni/M
Step 22:Assuming that L is original image I1Number of greyscale levels, k is its number of greyscale levels threshold value, selected threshold T (k)=k, and making With it original image I1Total pixel thresholding is divided into c1And c2Two class pixels, P are the probability that such pixel occurs;For two Class pixel c1And c2, it is respectively P per a kind of probability occurred1(k),P2(k):
It is assigned to c1And c2The average gray value of pixel be respectively m1,m2
In formula, C1For c1The number of pixels of class pixel, C2For c2The number of pixels of class pixel,
Whole image I1Global gray average be:
For inter-class variance, it is defined as:
Optimal threshold is k*, class variance between then maximizing
This is arrived, threshold value k*, by original image I1It is divided into c1And c2Two parts, by whole c1Class pixel is converted into gray level 0 pixel, by whole c2Class pixel is converted into the pixel that number of greyscale levels is 1, makes original image I1It is converted into bianry image I2, complete OTSU Threshold segmentations.
3. it is according to claim 1 a kind of based on morphologic high tension electric tower and high-tension bus-bar foreign matter detecting method, it is special Sign is that the step 3 is as follows:
Step 31:Assuming that collar plate shape structural element is S, the initial size of radius R sizes is r, and its radius R is with structure Increase when element S reuses, image is E, bianry image I after corrosion2
Bianry image, the bianry image I covered with it with structural element are scanned using structural element S2All it is if doing with operation 1, the pixel of image E is 1 after as a result corroding, and is otherwise 0;
Using corrosion by bianry image I2Corrosion reduction is carried out according to the radius R of collar plate shape structural element S, interstitial spaces is made to obtain It rejects, and makes bianry image I2Image erosion reduce, the part-structure of corrosion electric power facility is rejected, while also to electric power facility Foreign matter carries out corrosion reduction;If collar plate shape structural element S is reused, as its radius R sizes increase, increase bianry image I2The rejecting of interstitial spaces and bianry image I2Image erosion reduce ability;
Step 32:Assuming that image is E after corrosion, and with the collar plate shape structural element S of step 31, image E is expanded to obtain Image I3
Bianry image, the bianry image I covered with it with structural element are scanned using collar plate shape structural element S2Do OR operation such as Fruit is all 0, image I after as a result expanding3The pixel be 0, be otherwise 1;
Using expansion by the image E after corrosion with identical collar plate shape structural element S to the big of the electric power facility foreign matter after corrosion Small shape restored according to the radius R expansions of collar plate shape structural element S, image I after being expanded3;If collar plate shape structural elements When plain S is reused, as its radius R sizes increase, the restorability image size of image is restored after increasing corrosion, After image rejects some electrical power facilities section structure and background after excessive erosion expansion process, rough electric power facility foreign matter is obtained Position.
4. it is according to claim 1 a kind of based on morphologic high tension electric tower and high-tension bus-bar foreign matter detecting method, it is special Sign is that the step 4 is as follows:
Step 41:To image I3Gaussian filtering is carried out, specially:
Assuming that two-dimensional nucleus vector is K, variance σ, image I3Pixel transverse and longitudinal coordinate be x, y, determine parameter obtain two-dimensional nucleus vector K;
Above formula is the two-dimensional Gaussian function of discretization, determines and carries out image gaussian filtering after parameter obtains two-dimensional nucleus vector, makes to wait for The gray value of pixel and its neighborhood point of filtering is weighted average;
Step 42:With two matrix s of image partial derivative in the x and y directionxAnd syThe finite difference of single order local derviation is obtained, about The gradient of gray value of image is carried out approximate using first difference point:
And calculate image I using the finite difference of single order local derviation3The amplitude M and direction θ of gradient;
Step 43:Using the amplitude M and direction θ of gradient, non-maxima suppression is carried out to gradient magnitude, finds pixel part most Gray value corresponding to non-maximum point is set to 0 by big value, the Grad of both sides on the Grad and gradient direction of current location It is compared with gradient direction perpendicular to edge direction;A bianry image is obtained after completing non-maxima suppression, non-edge Point gray value is 0, may be the local gray level maximum point gray scale at edge is 128;
Step 44:Edge is detected and connected with dual threashold value-based algorithm, selects two threshold values, an edge graph is obtained according to high threshold Picture, when reaching the endpoint of profile, is found full edge link at profile in high threshold image in 8 neighborhood points of breakpoint The point of sufficient Low threshold collects new edge further according to this point, until whole image edge closure, obtains the inspection of canny operators edge Image I after survey4
5. it is according to claim 1 a kind of based on morphologic high tension electric tower and high-tension bus-bar foreign matter detecting method, it is special Sign is that the step 6 is as follows:
Step 61:To step 5 gained image I5The area statistics for carrying out all connected regions, the area for obtaining connected region are maximum Value and minimum value, and calculate the circularity of connected region;
Step 62:Judge whether connected region maximum area is equal to 0, if so, and enter step 7, otherwise then enter step 63;
Step 63:Judge whether the Maximum Area of connected region and the ratio of the area minimum value of connected region belong to normal model It encloses, if so, enter step 64, otherwise, then return to step 3;
Step 64:Judge whether the circularity of all foreign matters belongs to normal range (NR), if so, entering step 65, otherwise, then returns Step 3;
Step 65:Judge whether the area minimum value of connected region belongs to normal range (NR), if so, entering step 66, otherwise, then Return to step 3;
Step 66:Judge whether the Maximum Area of connected region belongs to normal range (NR), if so, entering step 67, otherwise, then Return to step 3;
Step 67:Judge whether foreign matter number belongs to normal range (NR), if so, enter step 68, otherwise, then return to step 3.
Step 68:The number and location of foreign matter in high tension electric tower and high-tension bus-bar that statistics finally determines.
6. it is according to claim 1 a kind of based on morphologic high tension electric tower and high-tension bus-bar foreign matter detecting method, it is special Sign is that the step 7 is as follows:
Step 71:Foreign matter region center-of-mass coordinate is obtained, deposit array is used as final positioning;
Step 72:After the outline position for obtaining foreign matter region, this location information is used for artwork, by the ash for changing corresponding position Angle value is changed into marked region of tinting.
7. one kind according to claim 1-6 is based on morphologic high tension electric tower and high-tension bus-bar foreign matter detecting method, It is characterized in that, in the step 2, to image I1It is split to obtain bianry image I2Before, first to image I1Carry out RGB figures The channel B extraction process of picture.
CN201810287894.5A 2018-04-03 2018-04-03 A kind of foreign matter detecting method based on morphologic high tension electric tower and high-tension bus-bar Pending CN108665464A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810287894.5A CN108665464A (en) 2018-04-03 2018-04-03 A kind of foreign matter detecting method based on morphologic high tension electric tower and high-tension bus-bar

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810287894.5A CN108665464A (en) 2018-04-03 2018-04-03 A kind of foreign matter detecting method based on morphologic high tension electric tower and high-tension bus-bar

Publications (1)

Publication Number Publication Date
CN108665464A true CN108665464A (en) 2018-10-16

Family

ID=63782961

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810287894.5A Pending CN108665464A (en) 2018-04-03 2018-04-03 A kind of foreign matter detecting method based on morphologic high tension electric tower and high-tension bus-bar

Country Status (1)

Country Link
CN (1) CN108665464A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110211102A (en) * 2019-05-23 2019-09-06 杭州良淋电子科技股份有限公司 A kind of racket wire break detection method of unmanned network renting and selling device
CN110334750A (en) * 2019-06-21 2019-10-15 西安工程大学 Image Classification and Recognition Method of Corrosion Degree of Transmission Line Tower Bolts
CN110363749A (en) * 2019-06-21 2019-10-22 西安工程大学 Evaluation method of anti-vibration hammer corrosion degree based on image processing
CN111062257A (en) * 2019-11-21 2020-04-24 四川极智朗润科技有限公司 Micro target identification method based on morphological and kinematic characteristics
CN111160074A (en) * 2018-11-08 2020-05-15 欧菲影像技术(广州)有限公司 Method, device, computer equipment and storage medium for identifying foreign objects in equipment
CN111489371A (en) * 2020-04-22 2020-08-04 西南科技大学 Image segmentation method for scene with histogram approximate to unimodal distribution
CN113454558A (en) * 2020-09-24 2021-09-28 深圳市大疆创新科技有限公司 Obstacle detection method and device, unmanned aerial vehicle and storage medium
CN114283385A (en) * 2021-12-29 2022-04-05 华南理工大学 Foreign matter data generation method and terminal

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6363320B1 (en) * 2000-08-18 2002-03-26 Geospatial Technologies Inc. Thin-client real-time interpretive object tracking system
CN101447029A (en) * 2008-12-11 2009-06-03 赵怀志 Method for automatically indentifying structures in front of roads
CN103442209A (en) * 2013-08-20 2013-12-11 北京工业大学 Video monitoring method of electric transmission line
CN104700112A (en) * 2015-02-02 2015-06-10 电子科技大学 Method for detecting parasite eggs in excrement based on morphological characteristics
CN104713526A (en) * 2015-04-01 2015-06-17 无锡桑尼安科技有限公司 Detection method of foreign objects on transmission line
CN106295588A (en) * 2016-08-17 2017-01-04 电子科技大学 The automatic identifying method of leukocyte in a kind of leucorrhea micro-image
CN106780438A (en) * 2016-11-11 2017-05-31 广东电网有限责任公司清远供电局 Defects of insulator detection method and system based on image procossing
CN106845346A (en) * 2016-12-16 2017-06-13 北京无线电计量测试研究所 A kind of image detecting method for airfield runway foreign bodies detection
CN106960438A (en) * 2017-03-25 2017-07-18 安徽继远软件有限公司 Method for recognizing impurities to transmission line of electricity is converted based on Hough straight line
CN107451998A (en) * 2017-08-08 2017-12-08 北京大恒普信医疗技术有限公司 A kind of eye fundus image method of quality control

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6363320B1 (en) * 2000-08-18 2002-03-26 Geospatial Technologies Inc. Thin-client real-time interpretive object tracking system
CN101447029A (en) * 2008-12-11 2009-06-03 赵怀志 Method for automatically indentifying structures in front of roads
CN103442209A (en) * 2013-08-20 2013-12-11 北京工业大学 Video monitoring method of electric transmission line
CN104700112A (en) * 2015-02-02 2015-06-10 电子科技大学 Method for detecting parasite eggs in excrement based on morphological characteristics
CN104713526A (en) * 2015-04-01 2015-06-17 无锡桑尼安科技有限公司 Detection method of foreign objects on transmission line
CN106295588A (en) * 2016-08-17 2017-01-04 电子科技大学 The automatic identifying method of leukocyte in a kind of leucorrhea micro-image
CN106780438A (en) * 2016-11-11 2017-05-31 广东电网有限责任公司清远供电局 Defects of insulator detection method and system based on image procossing
CN106845346A (en) * 2016-12-16 2017-06-13 北京无线电计量测试研究所 A kind of image detecting method for airfield runway foreign bodies detection
CN106960438A (en) * 2017-03-25 2017-07-18 安徽继远软件有限公司 Method for recognizing impurities to transmission line of electricity is converted based on Hough straight line
CN107451998A (en) * 2017-08-08 2017-12-08 北京大恒普信医疗技术有限公司 A kind of eye fundus image method of quality control

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
张凤羽: "基于计算机视觉的输电线路异常巡检图的识别和研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
查宇飞 等: "《视频目标跟踪方法》", 31 July 2015, 国防工业出版社 *
王延江 等: "《数字图像处理》", 30 November 2016, 中国石油大学出版社 *
赵腾 等: "高压架空线路异物检测的研究", 《科技论坛》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111160074A (en) * 2018-11-08 2020-05-15 欧菲影像技术(广州)有限公司 Method, device, computer equipment and storage medium for identifying foreign objects in equipment
CN111160074B (en) * 2018-11-08 2024-12-24 欧菲影像技术(广州)有限公司 Method, device, computer equipment and storage medium for identifying foreign matter inside equipment
CN110211102A (en) * 2019-05-23 2019-09-06 杭州良淋电子科技股份有限公司 A kind of racket wire break detection method of unmanned network renting and selling device
CN110334750A (en) * 2019-06-21 2019-10-15 西安工程大学 Image Classification and Recognition Method of Corrosion Degree of Transmission Line Tower Bolts
CN110363749A (en) * 2019-06-21 2019-10-22 西安工程大学 Evaluation method of anti-vibration hammer corrosion degree based on image processing
CN110334750B (en) * 2019-06-21 2021-06-08 西安工程大学 Image Classification and Recognition Method of Corrosion Degree of Transmission Line Tower Bolts
CN111062257A (en) * 2019-11-21 2020-04-24 四川极智朗润科技有限公司 Micro target identification method based on morphological and kinematic characteristics
CN111489371A (en) * 2020-04-22 2020-08-04 西南科技大学 Image segmentation method for scene with histogram approximate to unimodal distribution
CN113454558A (en) * 2020-09-24 2021-09-28 深圳市大疆创新科技有限公司 Obstacle detection method and device, unmanned aerial vehicle and storage medium
CN114283385A (en) * 2021-12-29 2022-04-05 华南理工大学 Foreign matter data generation method and terminal

Similar Documents

Publication Publication Date Title
CN108665464A (en) A kind of foreign matter detecting method based on morphologic high tension electric tower and high-tension bus-bar
CN114627118B (en) A kind of optical fiber cable insulation defect identification method and system
CN103488988B (en) Method for extracting insulators in electrical equipment based on unmanned aerial vehicle line patrol visible light image
CN106960438A (en) Method for recognizing impurities to transmission line of electricity is converted based on Hough straight line
CN110264448B (en) A method of insulator fault detection based on machine vision
CN106683075B (en) A method for detecting bolt defects at the cross arm of a transmission line tower
CN109785285B (en) A Method of Insulator Damage Detection Based on Ellipse Feature Fitting
CN103442209B (en) Video monitoring method of electric transmission line
CN111814686A (en) A vision-based transmission line identification and foreign object intrusion online detection method
CN111260616A (en) Insulator crack detection method based on Canny operator two-dimensional threshold segmentation optimization
CN109631848B (en) Transmission line foreign matter intrusion detection system and detection method
CN111652857B (en) A kind of infrared detection method of insulator defect
CN106056619A (en) Unmanned aerial vehicle vision wire patrol method based on gradient constraint Radon transform
CN112435208B (en) Insulator region detection method for significant edge guidance
CN103543394A (en) A method for extracting quantitative parameters of high-voltage electrical equipment discharge ultraviolet imaging
CN114241364A (en) A rapid calibration method for foreign object targets in overhead transmission lines
CN110210477A (en) A kind of digital instrument Recognition of Reading method
CN107967681A (en) Defect inspection method is hindered in a kind of elevator compensation chain punching based on machine vision
CN112508913B (en) Cable section edge detection method based on image detection
CN113487563B (en) An adaptive detection method for photovoltaic module cracks based on EL images
CN105741244A (en) Method for removing shadows and halos under weak light through indoor polling robot
CN112819784A (en) Method and system for detecting broken strands and scattered strands of wires of distribution line
CN115423740A (en) Method for identifying size of internal defect area of EPR vehicle-mounted cable terminal
CN116863211A (en) Deep learning-based visual detection method for hot spot effect of photovoltaic module
CN114581364A (en) GIS defect detection method based on X-ray imaging and Sobel-SCN

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: 20181016