CN116843909B - Power line extraction method and device, storage medium and computer equipment - Google Patents
Power line extraction method and device, storage medium and computer equipment Download PDFInfo
- Publication number
- CN116843909B CN116843909B CN202310540202.4A CN202310540202A CN116843909B CN 116843909 B CN116843909 B CN 116843909B CN 202310540202 A CN202310540202 A CN 202310540202A CN 116843909 B CN116843909 B CN 116843909B
- Authority
- CN
- China
- Prior art keywords
- image
- tower
- power line
- transmission line
- electric tower
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/22—Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/762—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
- G06V10/763—Non-hierarchical techniques, e.g. based on statistics of modelling distributions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/10—Terrestrial scenes
- G06V20/17—Terrestrial scenes taken from planes or by drones
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y04—INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
- Y04S—SYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
- Y04S10/00—Systems supporting electrical power generation, transmission or distribution
- Y04S10/50—Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Software Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Computation (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Remote Sensing (AREA)
- Probability & Statistics with Applications (AREA)
- Image Analysis (AREA)
Abstract
本申请公开了一种电力线提取方法及装置、存储介质、计算机设备,该方法包括:根据坐标预测模型对待检测输电线路对应的输电线路标准化图像进行电塔坐标预测,得到电塔预测坐标;对输电线路标准化图像进行边缘检测,获得边缘检测结果图像并计算电塔偏移角度;根据电塔预测坐标在输电线路标准化图像中确定电塔定位框,并根据电塔定位框及电塔偏移角度确定有效电力线提取区域;对有效电力线提取区域进行直线检测,并将检测出的直线中与电塔偏移角度垂直的直线确定为候选电力线,根据预设电力线模板对候选电力线进行投票,根据投票结果确定待检测输电线路的电力线。通过结合无监督算法及有监督算法,提高了电力线提取的准确性。
This application discloses a power line extraction method and device, storage medium, and computer equipment. The method includes: predicting the coordinates of the electric tower based on the coordinate prediction model on the standardized image of the transmission line corresponding to the transmission line to be detected, and obtaining the predicted coordinates of the electric tower; Perform edge detection on the standardized image of the transmission line, obtain the edge detection result image and calculate the offset angle of the electrical tower; determine the electrical tower positioning frame in the standardized image of the transmission line based on the predicted coordinates of the electrical tower, and determine it based on the electrical tower positioning frame and the offset angle of the electrical tower. Effective power line extraction area; perform straight line detection on the effective power line extraction area, and determine the straight line perpendicular to the offset angle of the power tower among the detected straight lines as the candidate power line, vote on the candidate power line according to the preset power line template, and determine based on the voting results Power lines of transmission lines to be inspected. By combining unsupervised algorithms and supervised algorithms, the accuracy of power line extraction is improved.
Description
技术领域Technical Field
本申请涉及电力线巡检技术领域,尤其是涉及到一种电力线提取方法及装置、存储介质、计算机设备。The present application relates to the technical field of power line inspection, and in particular to a power line extraction method and device, a storage medium, and a computer device.
背景技术Background Art
随着国家高压输电线路规模的不断扩大,输电网络覆盖的环境范围越来越复杂,保障输电线路的安全稳定运行愈加困难。传统输电线路巡检主要依靠人工地面巡检和载人直升机巡检,然而高压输电线路多分布在人烟稀少的山区,其环境各异且交通不便,通过人工巡检的方式,时效性和准确性不高,且存在安全风险,而通过直升机巡检的方式则经济性较差。与传统输电线路巡检方法相比,采用无人机等可以无人驾驶的机器进行巡检,具有成本低、操作方便等优点。无人机等无人驾驶机器可以用来搭载高分辨率的航空相机或其他拍摄机器,用于拍摄航空图像,通过航空图像对高压输电线路进行巡检的方式,成本低且安全风险系数小。With the continuous expansion of the scale of the country's high-voltage transmission lines, the environmental scope covered by the transmission network is becoming more and more complex, and it is becoming more and more difficult to ensure the safe and stable operation of the transmission lines. Traditional transmission line inspections mainly rely on manual ground inspections and manned helicopter inspections. However, high-voltage transmission lines are mostly distributed in sparsely populated mountainous areas with different environments and inconvenient transportation. The timeliness and accuracy of manual inspections are not high, and there are safety risks, while helicopter inspections are less economical. Compared with traditional transmission line inspection methods, the use of unmanned machines such as drones for inspections has the advantages of low cost and easy operation. Unmanned machines such as drones can be used to carry high-resolution aerial cameras or other shooting machines to take aerial images. The method of inspecting high-voltage transmission lines through aerial images is low-cost and has a low safety risk factor.
基于航拍图像的相关特征,国内外研究人员针对航拍图像的电力线检测的方法主要分为两类,无监督方法和有监督方法。无监督方法是基于电力线线性特征,将电力线认定为连续直线,通过经典直线检测方法实现电力线检测,如Radon变换、Hough变换、LSD直线检测、FLD线性判别方法,在复杂背景下,易受到道路和树木等具有线性特征物体干扰,且无人机航拍图像中存在噪声干扰,直接使用无监督方法会导致错检和漏检电力线。Based on the relevant features of aerial images, the methods used by domestic and foreign researchers for power line detection in aerial images are mainly divided into two categories: unsupervised methods and supervised methods. The unsupervised method is based on the linear features of power lines, identifying power lines as continuous straight lines, and realizing power line detection through classic straight line detection methods, such as Radon transform, Hough transform, LSD straight line detection, and FLD linear discrimination method. In complex backgrounds, it is easily interfered by objects with linear features such as roads and trees, and there is noise interference in drone aerial images. Direct use of unsupervised methods will lead to false detection and missed detection of power lines.
有监督方法使用深度学习模型,通常是卷积神经网络,通过大量手动标记的数据集来训练模型,电力线、绝缘子、输电塔检测都可通过监督学习实现,例如基于目标的MaskR-CNN和Fast R-CNN检测方法,具有检测精度高,但是检测时间成本高等特点,另外一种是基于回归的目标检测方法,如Yolo和SSD算法。上述监督算法需要一定数量标记的数据集,并且算法性能很大程度上取决于数据集质量。Supervised methods use deep learning models, usually convolutional neural networks, to train models through a large number of manually labeled data sets. Power line, insulator, and transmission tower detection can all be achieved through supervised learning. For example, the target-based MaskR-CNN and Fast R-CNN detection methods have high detection accuracy, but high detection time cost. Another type is regression-based target detection methods, such as Yolo and SSD algorithms. The above supervised algorithms require a certain number of labeled data sets, and the algorithm performance depends largely on the quality of the data set.
发明内容Summary of the invention
有鉴于此,本申请提供了一种电力线提取方法及装置、存储介质、计算机设备,通过结合无监督算法(直线检测)及有监督算法(坐标预测模型),提高了电力线提取的准确性。In view of this, the present application provides a power line extraction method and apparatus, a storage medium, and a computer device, which improves the accuracy of power line extraction by combining an unsupervised algorithm (straight line detection) and a supervised algorithm (coordinate prediction model).
根据本申请的一个方面,提供了一种电力线提取方法,所述方法包括:According to one aspect of the present application, a power line extraction method is provided, the method comprising:
获取待检测输电线路对应的输电线路标准化图像,根据坐标预测模型对所述输电线路标准化处图像进行电塔坐标预测,得到电塔预测坐标;Obtain a transmission line standardized image corresponding to the transmission line to be detected, and perform tower coordinate prediction on the transmission line standardized image according to a coordinate prediction model to obtain tower predicted coordinates;
对所述输电线路标准化图像进行边缘检测,获得边缘检测结果图像,基于所述边缘检测结果图像计算电塔偏移角度;Performing edge detection on the standardized image of the power transmission line to obtain an edge detection result image, and calculating the tower offset angle based on the edge detection result image;
根据所述电塔预测坐标,在所述输电线路标准化图像中确定电塔定位框,并根据所述电塔定位框及所述电塔偏移角度,确定有效电力线提取区域;According to the predicted coordinates of the electric tower, a tower positioning frame is determined in the standardized image of the power transmission line, and according to the tower positioning frame and the tower offset angle, an effective power line extraction area is determined;
对所述有效电力线提取区域进行直线检测,并将检测出的直线中与所述电塔偏移角度垂直的直线确定为候选电力线,根据预设电力线模板对所述候选电力线进行投票,根据投票结果确定待检测输电线路的电力线。The effective power line extraction area is subjected to straight line detection, and the straight lines perpendicular to the tower offset angle are determined as candidate power lines among the detected straight lines. The candidate power lines are voted according to a preset power line template, and the power lines of the transmission line to be detected are determined according to the voting results.
根据本申请的另一方面,提供了一种电力线提取装置,所述装置包括:According to another aspect of the present application, a power line extraction device is provided, the device comprising:
电塔坐标预测模块,用于获取待检测输电线路对应的输电线路标准化图像,根据坐标预测模型对所述输电线路标准化处图像进行电塔坐标预测,得到电塔预测坐标;The power tower coordinate prediction module is used to obtain the transmission line standardized image corresponding to the transmission line to be detected, and predict the tower coordinates of the transmission line standardized image according to the coordinate prediction model to obtain the tower predicted coordinates;
电塔角度计算模块,用于对所述输电线路标准化图像进行边缘检测,获得边缘检测结果图像,基于所述边缘检测结果图像计算电塔偏移角度;An electric tower angle calculation module is used to perform edge detection on the standardized image of the power transmission line to obtain an edge detection result image, and calculate the electric tower offset angle based on the edge detection result image;
有效区域确定模块,用于根据所述电塔预测坐标,在所述输电线路标准化图像中确定电塔定位框,并根据所述电塔定位框及所述电塔偏移角度,确定有效电力线提取区域;An effective area determination module is used to determine an electric tower positioning frame in the standardized image of the power transmission line according to the predicted coordinates of the electric tower, and determine an effective power line extraction area according to the electric tower positioning frame and the electric tower offset angle;
电力线提取模块,用于对所述有效电力线提取区域进行直线检测,并将检测出的直线中与所述电塔偏移角度垂直的直线确定为候选电力线,根据预设电力线模板对所述候选电力线进行投票,根据投票结果确定待检测输电线路的电力线。The power line extraction module is used to perform straight line detection on the effective power line extraction area, and determine the straight lines that are perpendicular to the tower offset angle among the detected straight lines as candidate power lines, vote on the candidate power lines according to the preset power line template, and determine the power lines of the transmission line to be detected according to the voting results.
依据本申请又一个方面,提供了一种存储介质,其上存储有计算机程序,所述程序被处理器执行时实现上述电力线提取方法。According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned power line extraction method is implemented.
依据本申请再一个方面,提供了一种计算机设备,包括存储介质、处理器及存储在存储介质上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述电力线提取方法。According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned power line extraction method when executing the program.
借由上述技术方案,本申请提供的一种电力线提取方法及装置、存储介质、计算机设备,根据坐标预测模型对待检测输电线路的输电线路标准化处图像进行电塔坐标预测,得到电塔预测坐标;对输电线路标准化图像进行边缘检测并计算电塔偏移角度;根据电塔预测坐标确定电塔定位框,并根据电塔定位框及电塔偏移角度,确定有效电力线提取区域;对有效电力线提取区域进行直线检测,并将检测出的直线中与电塔偏移角度垂直的直线确定为候选电力线,根据预设电力线模板对候选电力线进行投票,根据投票结果确定待检测输电线路的电力线。基于航拍图像的特征,根据有监督算法(坐标预测模型)获得电塔预测坐标,接着对输电线路标准化图像进行边缘检测,以便检测到准确清晰的边缘,根据边缘检测结果图像计算电塔偏移角度,结合先验知识电力线必须在电力塔范围内,电力线与电力塔垂直,通过直线检测算法在有效电力线提取区域内检测直线(无监督算法),最后选取与电塔偏移角度近似垂直的直线作为候选电力线,并根据预设电力线模板确定电力线,提高了电力线检测的准确性。By means of the above technical scheme, the present application provides a power line extraction method and device, storage medium, and computer equipment, which predict the tower coordinates of the transmission line standardized image of the transmission line to be detected according to the coordinate prediction model to obtain the tower prediction coordinates; perform edge detection on the transmission line standardized image and calculate the tower offset angle; determine the tower positioning frame according to the tower prediction coordinates, and determine the effective power line extraction area according to the tower positioning frame and the tower offset angle; perform straight line detection on the effective power line extraction area, and determine the straight line perpendicular to the tower offset angle among the detected straight lines as candidate power lines, vote for the candidate power lines according to the preset power line template, and determine the power line of the transmission line to be detected according to the voting results. Based on the features of aerial images, the predicted coordinates of the tower are obtained according to a supervised algorithm (coordinate prediction model). Then, edge detection is performed on the standardized image of the transmission line to detect accurate and clear edges. The offset angle of the tower is calculated based on the edge detection result image. Combined with the prior knowledge that the power line must be within the range of the power tower and the power line is perpendicular to the power tower, a straight line detection algorithm is used to detect straight lines in the effective power line extraction area (unsupervised algorithm). Finally, a straight line that is approximately perpendicular to the tower offset angle is selected as a candidate power line, and the power line is determined according to the preset power line template, thereby improving the accuracy of power line detection.
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
图1示出了本申请实施例提供的一种电力线提取方法的流程示意图;FIG1 is a schematic diagram showing a flow chart of a power line extraction method provided in an embodiment of the present application;
图2示出了本申请实施例提供的另一种电力线提取方法的流程示意图;FIG2 is a schematic diagram showing a flow chart of another power line extraction method provided in an embodiment of the present application;
图3示出了本申请实施例提供的又一种电力线提取方法的流程示意图;FIG3 is a schematic diagram showing a flow chart of another power line extraction method provided in an embodiment of the present application;
图4示出了本申请实施例提供的一种电力线提取装置的结构示意图;FIG4 shows a schematic structural diagram of a power line extraction device provided in an embodiment of the present application;
图5示出了本申请实施例提供的另一种电力线提取装置的结构示意图。FIG5 shows a schematic structural diagram of another power line extraction device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
下文中将参考附图并结合实施例来详细说明本申请。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
在本实施例中提供了一种电力线提取方法,如图1所示,该方法包括:In this embodiment, a method for extracting power lines is provided. As shown in FIG1 , the method includes:
步骤101,获取待检测输电线路对应的输电线路标准化图像,根据坐标预测模型对所述输电线路标准化处图像进行电塔坐标预测,得到电塔预测坐标。Step 101, obtaining a transmission line standardized image corresponding to the transmission line to be detected, and predicting the tower coordinates of the transmission line standardized image according to a coordinate prediction model to obtain tower predicted coordinates.
随着无人驾驶技术的发展,无人机技术应用于各行各业。对于电力线巡检技术领域,采用无人机等可以无人驾驶的机器进行巡检,具有成本低、操作方便等优点。无人机等无人驾驶机器可以用来搭载高分辨率的航空相机或其他拍摄机器,用于拍摄航空图像,通过航空图像对高压输电线路进行巡检的方式,成本低且安全风险系数小。航空图像具有有如下特征:电力线是线性物体,近似平行;电力线背景是自然风光;电力线由特殊材料制成,亮度均匀;电力线在航拍图像中表现为粗线或细线,左侧像素和右侧像素相反且局部平行;电力线宽度和外观颜色各不相同。With the development of unmanned driving technology, drone technology is applied to all walks of life. In the field of power line inspection technology, the use of unmanned machines such as drones for inspection has the advantages of low cost and easy operation. Unmanned machines such as drones can be used to carry high-resolution aerial cameras or other shooting machines to take aerial images. The method of inspecting high-voltage transmission lines through aerial images is low-cost and has a low safety risk factor. Aerial images have the following characteristics: power lines are linear objects and are approximately parallel; the background of power lines is natural scenery; power lines are made of special materials and have uniform brightness; power lines appear as thick or thin lines in aerial images, with opposite pixels on the left and right and partially parallel; power lines have different widths and appearance colors.
在本申请上述实施例中,基于航拍图像的特征对电力线进行提取,以便根据提取到的电力线检测输电线路。具体的,获取待检测输电线路对应的输电线路基础图像(航拍图像),对电线路基础图像进标准化处理,获得输电线路标准化图像,例如以航拍图像中心为参考点截取预设规格大小(1280×1280或640×640)的图像,并最后统一归一化为640×640大小图像。根据坐标预测模型对输电线路标准化处图像进行电塔坐标预测,得到电塔预测坐标。由电塔定位电力线先验知识可知,电力线必定分布在电塔范围内,通过坐标预测模型确定电塔位置后,可以根据电塔位置进行电力线提取,提高了电力线提取的效率。In the above-mentioned embodiment of the present application, the power lines are extracted based on the features of the aerial image, so as to detect the transmission lines according to the extracted power lines. Specifically, the basic image of the transmission line (aerial image) corresponding to the transmission line to be detected is obtained, and the basic image of the power line is standardized to obtain a standardized image of the transmission line. For example, an image of a preset size (1280×1280 or 640×640) is captured with the center of the aerial image as a reference point, and finally normalized to a 640×640 size image. The tower coordinates are predicted for the image of the standardized part of the transmission line according to the coordinate prediction model to obtain the tower prediction coordinates. It can be known from the prior knowledge of the tower positioning power lines that the power lines must be distributed within the range of the tower. After the tower position is determined by the coordinate prediction model, the power lines can be extracted according to the tower position, thereby improving the efficiency of power line extraction.
步骤102,对所述输电线路标准化图像进行边缘检测,获得边缘检测结果图像,基于所述边缘检测结果图像计算电塔偏移角度。Step 102: Perform edge detection on the standardized image of the power transmission line to obtain an edge detection result image, and calculate the tower offset angle based on the edge detection result image.
步骤103,根据所述电塔预测坐标,在所述输电线路标准化图像中确定电塔定位框,并根据所述电塔定位框及所述电塔偏移角度,确定有效电力线提取区域。Step 103, determining a tower positioning frame in the standardized image of the power transmission line according to the predicted tower coordinates, and determining an effective power line extraction area according to the tower positioning frame and the tower offset angle.
接着,对输电线路标准化图像进行边缘检测,以便检测到准确清晰的边缘,有利于进一步的电力线提取。进行边缘检测后获得边缘检测结果图像,基于边缘检测结果图像计算电塔偏移角度,为后续电力线提取做进一步准备。Next, edge detection is performed on the standardized image of the power transmission line to detect accurate and clear edges, which is conducive to further power line extraction. After edge detection, an edge detection result image is obtained, and the tower offset angle is calculated based on the edge detection result image to prepare for subsequent power line extraction.
再接着,根据电塔预测坐标,在输电线路标准化图像中确定电塔定位框,特别地,根据电塔定位电力线先验知识可知,在确定电塔的位置后,电力线必定分布在电塔范围内,故而根据电塔定位框及电塔偏移角度,可以进一步确定有效电力线提取区域,以消除电力塔范围外直线组对电力线提取过程的干扰。Next, according to the predicted coordinates of the tower, the tower positioning frame is determined in the standardized image of the transmission line. In particular, according to the prior knowledge of tower positioning power lines, after the position of the tower is determined, the power lines must be distributed within the range of the tower. Therefore, according to the tower positioning frame and the tower offset angle, the effective power line extraction area can be further determined to eliminate the interference of the straight line group outside the power tower range on the power line extraction process.
步骤104,对所述有效电力线提取区域进行直线检测,并将检测出的直线中与所述电塔偏移角度垂直的直线确定为候选电力线,根据预设电力线模板对所述候选电力线进行投票,根据投票结果确定待检测输电线路的电力线。Step 104, performing straight line detection on the effective power line extraction area, and determining the straight lines perpendicular to the tower offset angle among the detected straight lines as candidate power lines, voting on the candidate power lines according to a preset power line template, and determining the power lines of the transmission line to be detected according to the voting results.
再接着,对有效电力线提取区域进行直线检测,并将检测出的直线中与电塔偏移角度垂直的直线确定为候选电力线,根据预设电力线模板对候选电力线进行投票,根据投票结果确定待检测输电线路的电力线。结合先验知识电力线必定在电力塔范围内,电力线与电力塔垂直,基于边缘检测后图像(边缘检测结果图像)获取电塔偏移角度,并通过电塔定位框及电塔偏移角度来得到电力线范围(有效电力线提取区域),再滤除电力线范围外的环境干扰,之后使用直线检测算法检测直线,选取与电塔偏移角度近似垂直的直线作为候选电力线,最后通过结合预设电力线模板提取电力线,提高了电力线检测的准确性。Next, the effective power line extraction area is detected, and the straight lines detected that are perpendicular to the tower offset angle are determined as candidate power lines. The candidate power lines are voted according to the preset power line template, and the power lines of the transmission line to be detected are determined according to the voting results. Combined with the prior knowledge that the power line must be within the power tower range and the power line is perpendicular to the power tower, the tower offset angle is obtained based on the image after edge detection (edge detection result image), and the power line range (effective power line extraction area) is obtained through the tower positioning frame and the tower offset angle, and then the environmental interference outside the power line range is filtered out, and then the straight line detection algorithm is used to detect the straight line, and the straight line that is approximately perpendicular to the tower offset angle is selected as the candidate power line. Finally, the power line is extracted by combining the preset power line template, which improves the accuracy of power line detection.
通过应用本实施例的技术方案,根据坐标预测模型对待检测输电线路的输电线路标准化处图像进行电塔坐标预测,得到电塔预测坐标;对输电线路标准化图像进行边缘检测并计算电塔偏移角度;根据电塔预测坐标确定电塔定位框,并根据电塔定位框及电塔偏移角度,确定有效电力线提取区域;对有效电力线提取区域进行直线检测,并将检测出的直线中与电塔偏移角度垂直的直线确定为候选电力线,根据预设电力线模板对候选电力线进行投票,根据投票结果确定待检测输电线路的电力线。基于航拍图像的特征,根据有监督算法(坐标预测模型)获得电塔预测坐标,接着对输电线路标准化图像进行边缘检测,以便检测到准确清晰的边缘,根据边缘检测结果图像计算电塔偏移角度,结合先验知识电力线必须在电力塔范围内,电力线与电力塔垂直,通过直线检测算法在有效电力线提取区域内检测直线(无监督算法),最后选取与电塔偏移角度近似垂直的直线作为候选电力线,并根据预设电力线模板确定电力线,提高了电力线检测的准确性。By applying the technical solution of the present embodiment, the tower coordinates are predicted for the transmission line standardized portion image of the transmission line to be detected according to the coordinate prediction model to obtain the tower predicted coordinates; the edge detection is performed on the transmission line standardized image and the tower offset angle is calculated; the tower positioning frame is determined according to the tower predicted coordinates, and the effective power line extraction area is determined according to the tower positioning frame and the tower offset angle; straight line detection is performed on the effective power line extraction area, and the straight line perpendicular to the tower offset angle among the detected straight lines is determined as the candidate power line, the candidate power lines are voted according to the preset power line template, and the power line of the transmission line to be detected is determined according to the voting result. Based on the features of aerial images, the predicted coordinates of the tower are obtained according to a supervised algorithm (coordinate prediction model). Then, edge detection is performed on the standardized image of the transmission line to detect accurate and clear edges. The offset angle of the tower is calculated based on the edge detection result image. Combined with the prior knowledge that the power line must be within the range of the power tower and the power line is perpendicular to the power tower, a straight line detection algorithm is used to detect straight lines in the effective power line extraction area (unsupervised algorithm). Finally, a straight line that is approximately perpendicular to the tower offset angle is selected as a candidate power line, and the power line is determined according to the preset power line template, thereby improving the accuracy of power line detection.
进一步的,作为上述实施例具体实施方式的细化和扩展,为了完整说明本实施例的具体实施过程,提供了另一种电力线提取方法,如图2所示,该方法包括:Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another power line extraction method is provided, as shown in FIG2 , the method includes:
步骤201,获取待检测输电线路对应的输电线路标准化图像,根据坐标预测模型对所述输电线路标准化处图像进行电塔坐标预测,得到电塔预测坐标。Step 201, obtaining a transmission line standardized image corresponding to the transmission line to be detected, and predicting the tower coordinates of the transmission line standardized image according to a coordinate prediction model to obtain tower predicted coordinates.
在本申请上述实施例中,可以采用无人机对待检测输电线路进行拍摄,获得航拍图像(输电线路基础图像),对输电线路基础图像进行标准化操作,例如进行裁剪及归一化处理,获得输电线路标准化图像,可以有效提高航拍电力线图像质量,提高电力线提取准确性。根据坐标预测模型对输电线路标准化处图像进行电塔坐标预测,得到电塔预测坐标。In the above embodiments of the present application, a drone can be used to photograph the transmission line to be inspected to obtain an aerial image (a basic image of the transmission line), and the basic image of the transmission line can be standardized, such as cropping and normalization, to obtain a standardized image of the transmission line, which can effectively improve the quality of the aerial power line image and improve the accuracy of power line extraction. The tower coordinates are predicted for the transmission line standardized image according to the coordinate prediction model to obtain the tower predicted coordinates.
步骤202,对所述输电线路标准化图像中的像素进行灰度调整,获得输电线路灰度化图像,直方图均衡化处理所述输电线路灰度化图像,获得输电线路均衡化图像,根据高斯滤波法对所述输电线路均衡化图像进行去噪处理,获得输电线路预处理图像。Step 202, grayscale adjustment is performed on pixels in the standardized image of the power transmission line to obtain a grayscale image of the power transmission line, the grayscale image of the power transmission line is processed by histogram equalization to obtain a balanced image of the power transmission line, and denoising is performed on the balanced image of the power transmission line according to a Gaussian filter method to obtain a preprocessed image of the power transmission line.
接着,对输电线路标准化图像进行图像预处理,具体的,对输电线路标准化图像中的像素进行灰度调整,获得输电线路灰度化图像,以及直方图均衡化处理输电线路灰度化图像,获得输电线路均衡化图像,根据高斯滤波法对输电线路均衡化图像进行去噪处理,获得输电线路预处理图像。其中,使用灰度化、直方图均衡化等图像预处理技术调节图像对比度,并进行归一化操作后获得输电线路预处理图像,减少了后期电力线提取的运算量,同时也为后续进一步进行边缘检测,提供了便利。Next, the standardized image of the power transmission line is preprocessed. Specifically, the grayscale of the pixels in the standardized image of the power transmission line is adjusted to obtain a grayscale image of the power transmission line, and the grayscale image of the power transmission line is processed by histogram equalization to obtain a balanced image of the power transmission line. The balanced image of the power transmission line is denoised according to the Gaussian filter method to obtain a preprocessed image of the power transmission line. Among them, the image contrast is adjusted by using image preprocessing techniques such as grayscale and histogram equalization, and the preprocessed image of the power transmission line is obtained after normalization operation, which reduces the amount of calculation for the later power line extraction and also provides convenience for the subsequent further edge detection.
可选地,步骤202包括:Optionally, step 202 includes:
步骤202-1,根据像素灰度调整公式调整所述输电线路标准化图像中每个像素的灰度值,获得输电线路灰度化图像,其中,所述像素灰度调整公式为:Step 202-1, adjusting the gray value of each pixel in the standardized image of the power transmission line according to a pixel gray adjustment formula to obtain a gray image of the power transmission line, wherein the pixel gray adjustment formula is:
Gray(i,j)=0.29*R+0.578*G+0.114*BGray(i,j)=0.29*R+0.578*G+0.114*B
Gray(i,j)表示输电线路标准化图像对应的像素点矩阵中第i行第j列的灰度值,R、G及B分别表示红色通道矩阵、绿色通道矩阵及蓝色通道矩阵。Gray(i,j) represents the gray value of the i-th row and j-th column in the pixel matrix corresponding to the standardized image of the power transmission line, and R, G, and B represent the red channel matrix, green channel matrix, and blue channel matrix, respectively.
步骤202-2,根据直方图均衡化公式将所述输电线路灰度化图像中的灰度分布均衡化获得输电线路均衡化图像其中所述直方图均衡化公式为:Step 202-2, equalizing the grayscale distribution in the grayscale image of the power transmission line according to a histogram equalization formula to obtain a transmission line equalized image, wherein the histogram equalization formula is:
n表示输电线路灰度化图像中像素总和,k表示k级灰度级,nk表示灰度级为rk的像素个数,L表示输电线路灰度化图像中灰度级总数,pr(r)表示输电线路灰度化图像的灰度级概率密度。n represents the total number of pixels in the grayscale image of the transmission line, k represents the k-level grayscale, nk represents the number of pixels with grayscale level rk , L represents the total number of grayscale levels in the grayscale image of the transmission line, and p r (r) represents the grayscale probability density of the grayscale image of the transmission line.
在本申请上述实施例中,电力塔和电力线通常是银白色的,使用蓝色通道的灰度图像更容易使其与环境区分,因此采用蓝色通道作为灰度图。对于输电线路标准化图像,采用加权平均法进行灰度处理,即根据像素灰度调整公式调整输电线路标准化图像中每个像素的灰度值,获得输电线路灰度化图像,像素灰度调整公式为:In the above embodiment of the present application, the power tower and the power line are usually silvery white, and the grayscale image of the blue channel is more easily distinguished from the environment, so the blue channel is used as the grayscale image. For the standardized image of the transmission line, the weighted average method is used for grayscale processing, that is, the grayscale value of each pixel in the standardized image of the transmission line is adjusted according to the pixel grayscale adjustment formula to obtain the grayscale image of the transmission line. The pixel grayscale adjustment formula is:
Gray(i,j)=0.29*R+0.578*G+0.114Gray(i,j)=0.29*R+0.578*G+0.114
式中Gray(i,j)表示输电线路标准化图像对应的像素点矩阵中第i行第j列的灰度值,R、G及B分别表示红色通道矩阵、绿色通道矩阵及蓝色通道矩阵。Where Gray(i,j) represents the gray value of the i-th row and j-th column in the pixel matrix corresponding to the standardized image of the power transmission line, and R, G, and B represent the red channel matrix, green channel matrix, and blue channel matrix, respectively.
由于输电线路标准化图像灰度化后电力线较模糊,使用直方图均衡化调节输电线路灰度化图像的对比度,可以使电力线细节更为明显,具体的,根据直方图均衡化公式将输电线路灰度化图像中的灰度分布均衡化,获得输电线路均衡化图像,其中,直方图均衡化公式为:Since the power lines of the power line standardized image are blurred after graying, the contrast of the power line graying image is adjusted by using histogram equalization, which can make the power line details more obvious. Specifically, the gray distribution in the power line graying image is equalized according to the histogram equalization formula to obtain the power line equalization image, where the histogram equalization formula is:
式中n表示图像中像素总和,k表示某一灰度级,nk是灰度级为rk的像素个数,L为图像中灰度级总数,pr(r)表示图像的灰度级概率密度。Where n represents the total number of pixels in the image, k represents a certain gray level, nk is the number of pixels with gray level rk , L is the total number of gray levels in the image, and pr (r) represents the gray level probability density of the image.
步骤203,在Canny边缘检测算法包含的水平方向梯度模板及垂直方向梯度模板基础上,增加第一对角方向梯度模板及第二对角方向梯度模板后,根据四个方向梯度模板计算所述输电线路预处理图像的梯度值。Step 203, after adding a first diagonal gradient template and a second diagonal gradient template on the basis of the horizontal gradient template and the vertical gradient template included in the Canny edge detection algorithm, the gradient value of the transmission line preprocessed image is calculated according to the four directional gradient templates.
步骤204,根据迭代算法,在所述输电线路预处理图像各像素的灰度值中生成最高阈值及最低阈值,保留处于所述最高阈值及所述最低阈值之间的梯度值所对应的边缘像素,获得边缘检测结果图像。Step 204, according to the iterative algorithm, generate a maximum threshold and a minimum threshold in the gray value of each pixel of the transmission line preprocessing image, retain the edge pixels corresponding to the gradient values between the maximum threshold and the minimum threshold, and obtain an edge detection result image.
接着,对滤波后图像(输电线路预处理图像)进行边缘检测,传统的Canny边缘检测算法使用2×2模板来计算梯度幅度和大小,由于噪声干扰大,不能很好地检测图像的边缘细节,故对Canny边缘检测算法进行改进,即在原有的水平方向梯度模板及垂直方向梯度模板基础上,增加第一对角方向梯度模板及第二对角方向梯度模板后,根据四个方向梯度模板计算输电线路预处理图像的梯度值。接着根据迭代算法,在输电线路预处理图像各像素的灰度值中生成最高阈值及最低阈值,保留处于最高阈值及所述最低阈值之间的梯度值所对应的边缘像素,获得边缘检测结果图像。Next, edge detection is performed on the filtered image (power transmission line preprocessing image). The traditional Canny edge detection algorithm uses a 2×2 template to calculate the gradient amplitude and size. Due to the large noise interference, the edge details of the image cannot be detected well. Therefore, the Canny edge detection algorithm is improved, that is, on the basis of the original horizontal gradient template and vertical gradient template, the first diagonal gradient template and the second diagonal gradient template are added, and the gradient value of the power transmission line preprocessing image is calculated according to the four directional gradient templates. Then, according to the iterative algorithm, the highest threshold and the lowest threshold are generated in the gray value of each pixel of the power transmission line preprocessing image, and the edge pixels corresponding to the gradient values between the highest threshold and the lowest threshold are retained to obtain the edge detection result image.
具体的,对传统Canny边缘检测算法进行改进,增加两个梯度方向模板(第一对角方向梯度模板及第二对角方向梯度模板)后,水平、垂直及对角共计四个梯度模板如下所示:Specifically, the traditional Canny edge detection algorithm is improved by adding two gradient direction templates (the first diagonal direction gradient template and the second diagonal direction gradient template). A total of four gradient templates for horizontal, vertical and diagonal directions are as follows:
使用上述四个模板对过滤后图像(输电线路预处理图像)进行卷积,其中,The filtered image (pre-processed image of the transmission line) is convolved using the above four templates, where:
45°方向梯度计算公式为:The calculation formula of 45° direction gradient is:
135°方向梯度计算公式为:The calculation formula for the 135° direction gradient is:
水平方向梯度计算为:The horizontal gradient is calculated as:
垂直方向梯度计算公式为:The vertical gradient calculation formula is:
将45°和135°的计算梯度投影到水平和垂直方向,然后求和以获得x轴和y轴的新梯度值,公式为:The calculated gradients at 45° and 135° are projected to the horizontal and vertical directions, and then summed to obtain the new gradient values of the x-axis and y-axis, as follows:
然后计算当前像素灰度值的梯度大小M和方向D,计算公式为:Then calculate the gradient size M and direction D of the current pixel gray value. The calculation formula is:
增加两个方向的梯度计算方法,使像素周围的8个像素四个方向梯度值得到充分考虑,从而可以获得更多的图像边缘信息,也使边缘定位变得更加准确,从而大大降低了误检率、漏检率。By adding the gradient calculation method in two directions, the gradient values in four directions of the eight pixels around the pixel can be fully considered, so that more image edge information can be obtained and the edge positioning can be made more accurate, thereby greatly reducing the false detection rate and missed detection rate.
进一步地,由于Canny边缘检测算法通过人工经验选取高低阈值的局限性,难以获得最优阈值,从而影响电力线检测结果,本申请实施例使用迭代算法获得最佳的高阈值和低阈值。Furthermore, due to the limitation of the Canny edge detection algorithm in selecting high and low thresholds through manual experience, it is difficult to obtain the optimal threshold, which affects the power line detection result. The embodiment of the present application uses an iterative algorithm to obtain the optimal high and low thresholds.
具体的,首先设定初始阈值,公式为:Specifically, first set the initial threshold, the formula is:
T{Tk|K=0}T{T k |K=0}
其中,T是图像的初始阈值,K是算法的迭代次数,Zmax是最大灰度值,Zmin是最小灰度值,计算获得初始阈值后,将输电线路预处理图像分为高于初始阈值的H0和低于初始阈值H1的两部分,H0及H1公式分别为:Among them, T is the initial threshold of the image, K is the number of iterations of the algorithm, Z max is the maximum grayscale value, and Z min is the minimum grayscale value. After calculating the initial threshold, the transmission line preprocessing image is divided into two parts: H 0 above the initial threshold and H 1 below the initial threshold. The formulas for H 0 and H 1 are:
H0={f(x,y)|f(x,y)>T}H 0 = {f(x,y)|f(x,y)>T}
H1={f(x,y)|f(x,y)<T}H 1 = {f(x,y)|f(x,y)<T}
分别计算两部分的灰度平均值TH、TL,其中,TH及TL公式分别为:Calculate the grayscale average values TH and TL of the two parts respectively, where the formulas of TH and TL are:
这里的f(x,y)表示图像中(i,j)点灰度值,其中,N0(i,j)、N1(i,j)取值公式分别为:Here f(x,y) represents the gray value of point (i,j) in the image, where the formulas for N 0 (i,j) and N 1 (i,j) are:
再计算新阈值TN,公式为:Then calculate the new threshold TN, the formula is:
当最终迭代阈值等于初始阈值或满足设定的合理误差范围时,迭代停止,否则迭代继续运行,最终获得最佳TH、TL,为此,大大减少了噪声对对阈值选择的干扰。When the final iteration threshold is equal to the initial threshold or meets the set reasonable error range, the iteration stops, otherwise the iteration continues to run, and finally the best TH and TL are obtained, so that the interference of noise on the threshold selection is greatly reduced.
通过将高斯滤波后图像(输电线路预处理图像)进行边缘检测,得到干扰较少的图像,以及对Canny边缘检测算法进行改进,引入45°、135°梯度模板,使像素周围的8个像素四个方向梯度值得到充分考虑,从而可以获得更多的图像边缘信息,使得边缘定位变得更加准确,大大降低了误检率、漏检率。针对传统Canny边缘检测算法中高低阈值的数值关系,通过迭代方法获取最优双阈值,相比传统Canny边缘检测算法而言,减少了噪声对对阈值选择的干扰,大大提高了检测精度和鲁棒性。By performing edge detection on the Gaussian filtered image (preprocessed image of the transmission line), an image with less interference is obtained, and the Canny edge detection algorithm is improved by introducing 45° and 135° gradient templates, so that the gradient values of the four directions of the eight pixels around the pixel are fully considered, so that more image edge information can be obtained, making edge positioning more accurate, greatly reducing the false detection rate and missed detection rate. In view of the numerical relationship between the high and low thresholds in the traditional Canny edge detection algorithm, the optimal dual threshold is obtained through an iterative method. Compared with the traditional Canny edge detection algorithm, the interference of noise on the threshold selection is reduced, and the detection accuracy and robustness are greatly improved.
步骤205,根据Hough变换算法计算所述边缘检测结果图像对应的潜在电力线及潜在电力线斜率,根据所述潜在电力线斜率,确定互相平行的潜在电力线组。Step 205, calculating the potential lines of force and the potential lines of force slope corresponding to the edge detection result image according to the Hough transform algorithm, and determining a group of potential lines of force that are parallel to each other according to the potential lines of force slope.
步骤206,根据K-means++聚类算法对所述潜在电力线组的斜率进行聚类,确定多个类中包含的斜率数量最多的目标类,获取所述目标类的聚类中心斜率作为角度θ1,根据所述角度θ1及电塔偏移角度计算公式计算电塔偏移角度θ2,其中,所述电塔偏移角度计算公式为:Step 206, clustering the slopes of the potential power line groups according to the K-means++ clustering algorithm, determining a target class with the largest number of slopes among the multiple classes, obtaining the cluster center slope of the target class as the angle θ 1 , and calculating the tower offset angle θ 2 according to the angle θ 1 and the tower offset angle calculation formula, wherein the tower offset angle calculation formula is:
接着,根据Hough变换算法计算边缘检测结果图像对应的潜在电力线及潜在电力线斜率,根据潜在电力线斜率,确定互相平行的潜在电力线组,根据K-means++聚类算法对潜在电力线组的斜率进行聚类,确定多个类中包含的斜率数量最多的目标类,获取目标类的聚类中心斜率作为角度θ1,根据角度θ1及电塔偏移角度计算公式计算电塔偏移角度θ2。Next, the potential power lines and the potential power line slopes corresponding to the edge detection result image are calculated according to the Hough transform algorithm. According to the potential power line slopes, the potential power line groups parallel to each other are determined. According to the K-means++ clustering algorithm, the slopes of the potential power line groups are clustered to determine the target class with the largest number of slopes among multiple classes. The cluster center slope of the target class is obtained as the angle θ 1 , and the tower offset angle θ 2 is calculated according to the angle θ 1 and the tower offset angle calculation formula.
具体的,Hough变换算法是图像特征提取技术的一种,根据点和线的对偶性,将形状提取问题转换为参数空间峰值计算问题,其中,直线转换到参数空间的方程可表述为:Specifically, the Hough transform algorithm is a type of image feature extraction technology. Based on the duality of points and lines, the shape extraction problem is converted into a peak value calculation problem in parameter space. The equation for converting a straight line into parameter space can be expressed as:
rθ=xθcosθ+yθsinθ rθ = xθcosθ + yθsinθ
式中,rθ表示直角坐标系中从原点到直线的距离,θ表示直线与x轴的夹角,对于每一对(rθ,θ)表示过(xθ,yθ)的直线。In the formula, r θ represents the distance from the origin to the straight line in the rectangular coordinate system, θ represents the angle between the straight line and the x-axis, and for each pair (r θ ,θ) represents the straight line passing through (x θ ,y θ ).
接着,通过参数空间累加器计算的局部最大值与特定形状对应,得到原始图像中的特定形状,具体的,建立参数空间累加器二维数组(r,θ),将图像中所有待检像素根据直线极坐标得到累加器数组,并将累加器数组加1,求出累加器中局部最大值所对应的(r′,θ′),提取对应直线段。Next, the local maximum value calculated by the parameter space accumulator corresponds to the specific shape, and the specific shape in the original image is obtained. Specifically, a two-dimensional array (r, θ) of the parameter space accumulator is established, and the accumulator array is obtained according to the straight line polar coordinates of all the pixels to be tested in the image, and the accumulator array is added by 1 to obtain the (r′, θ′) corresponding to the local maximum value in the accumulator, and the corresponding straight line segment is extracted.
由于电力线在航拍图像中贯穿整幅图像,Hough变换算法对长线有准确的检测结果,并且可以增加检测阈值来过滤一些短直线,减少干扰。为获取潜在电力线组,本申请实施例将Hough变换算法应用于改进的Canny边缘检测算法检测后的边缘检测结果图像,得到直线组参数(r,θ)。Since power lines run through the entire image in an aerial image, the Hough transform algorithm has accurate detection results for long lines, and the detection threshold can be increased to filter out some short straight lines to reduce interference. In order to obtain potential power line groups, the embodiment of the present application applies the Hough transform algorithm to the edge detection result image after detection by the improved Canny edge detection algorithm to obtain the line group parameters (r, θ).
对于Hough变换算法检测到的直线,并不是所有的直线都一定是需要的电力线,因此需对获得的直线结果进行滤波。由先验知识可知,在航拍图像中,电力线彼此平行,因此对直线的斜率进行滤波,并将平行对保存。同时,由于电力线贯穿整个图像,增加Hough变换算法检测到的最低线段的长度有利于聚类算法中的分类。For the straight lines detected by the Hough transform algorithm, not all straight lines are necessarily the required power lines, so the straight line results obtained need to be filtered. According to prior knowledge, in aerial images, the power lines are parallel to each other, so the slopes of the straight lines are filtered and the parallel pairs are saved. At the same time, since the power lines run through the entire image, increasing the length of the lowest line segment detected by the Hough transform algorithm is beneficial to classification in the clustering algorithm.
K-Means聚类算法是数据挖掘算法之一,由于K个随机初始聚类中心对聚类结果收敛性影响具有不确定性,为了提高收敛速度,本申请实施例选择K-means++。具体的,从输入数据集X中选取一个随机点作为第一聚类中心,确定数据集X中的每个点x与所选择的聚类中心之间的距离D(x),接着确定样本点x将被选择为聚类中心的可能性的p值,p值的求取公式为:K-Means clustering algorithm is one of the data mining algorithms. Since the influence of K random initial cluster centers on the convergence of clustering results is uncertain, in order to improve the convergence speed, K-means++ is selected in the embodiment of the present application. Specifically, a random point is selected from the input data set X as the first cluster center, and the distance D(x) between each point x in the data set X and the selected cluster center is determined. Then, the p value of the possibility that the sample point x will be selected as the cluster center is determined. The formula for calculating the p value is:
选择具有高概率p值的样本点,直到选择必要的k个聚类中心作为新的聚类中心。然后,使用所选择的k个初始聚类中心来执行K-means算法。Select sample points with high probability p values until the necessary k cluster centers are selected as new cluster centers. Then, the K-means algorithm is performed using the selected k initial cluster centers.
本申请实施例使用K-means++算法对平行线组的斜率进行聚类,得到计数结果最多的θ1,通过θ1来计算电塔角度θ2,公式为:The embodiment of the present application uses the K-means++ algorithm to cluster the slopes of the parallel line group, and obtains θ 1 with the most count results. The tower angle θ 2 is calculated by θ 1 , and the formula is:
为此,使用K-Means聚类获得了电塔倾斜角度θ2。To this end, K-Means clustering is used to obtain the tower tilt angle θ 2 .
步骤207,根据所述电塔预测坐标,在所述输电线路标准化图像中确定电塔定位框,并根据所述电塔定位框及所述电塔偏移角度,确定有效电力线提取区域。Step 207, determining a tower positioning frame in the standardized image of the power transmission line according to the predicted tower coordinates, and determining an effective power line extraction area according to the tower positioning frame and the tower offset angle.
步骤208,对所述有效电力线提取区域进行直线检测,并将检测出的直线中与所述电塔偏移角度垂直的直线确定为候选电力线,根据预设电力线模板对所述候选电力线进行投票,根据投票结果确定待检测输电线路的电力线。Step 208, perform straight line detection on the effective power line extraction area, and determine the straight lines that are perpendicular to the tower offset angle among the detected straight lines as candidate power lines, vote on the candidate power lines according to the preset power line template, and determine the power lines of the transmission line to be detected according to the voting results.
接着,根据电塔预测坐标,在输电线路标准化图像中确定电塔定位框,并根据电塔定位框及电塔偏移角度,确定有效电力线提取区域,例如根据电塔定位框及电塔偏移角度确定电塔偏移框,并将电塔偏移框的左上角点和右下角点(或右上角和左下脚)平行于电力线θ1延伸,得到有效电力线提取区域,以消除电力塔范围外直线对电力线提取的干扰。对有效电力线提取区域进行直线检测,并将检测出的直线中与电塔偏移角度垂直的直线确定为候选电力线,根据预设电力线模板对候选电力线进行投票,根据投票结果确定待检测输电线路的电力线。Next, according to the predicted coordinates of the power tower, the power tower positioning frame is determined in the standardized image of the power transmission line, and according to the power tower positioning frame and the power tower offset angle, the effective power line extraction area is determined, for example, the power tower offset frame is determined according to the power tower positioning frame and the power tower offset angle, and the upper left corner point and the lower right corner point (or the upper right corner and the lower left foot) of the power tower offset frame are extended parallel to the power line θ1 to obtain the effective power line extraction area, so as to eliminate the interference of the straight line outside the power tower range on the power line extraction. The effective power line extraction area is detected by straight lines, and the straight lines perpendicular to the tower offset angle among the detected straight lines are determined as candidate power lines, and the candidate power lines are voted according to the preset power line template, and the power lines of the power transmission line to be detected are determined according to the voting results.
目前,无监督电力线检测算法实现途径为将电力线视为直线,通过高斯滤波方法去除噪声,并使用Canny算子进行边缘检测,提取物体边缘,再结合Hough变换算法提取图像中直线,最后通过平行约束和直线分组方法,将电力线连接起来。其中,Canny边缘检测算法具有计算步骤少、易于实现的特点,但由于存在噪声、道路和树木等环境干扰,会出现伪边缘和边缘缺失的问题,且在电力线检测中易出现双边缘,影响边缘定位的准确性。Hough变换算法具有较好抗干扰特性,但是时间和空间复杂度高,只检测直线方向,丢失直线长度信息,并且在复杂背景下,受到树木、田埂干扰,性能受到显著影响,电力线无法完全检测出来,还会检测出无关线段。本申请实施例基于航拍图像的图像特征,对Canny边缘检测算法进行改进,引入45°、135°梯度模板,同时针对传统Canny边缘检测算法中高低阈值的数值关系,通过迭代方法获取最优双阈值,提高了边缘检测的精度和鲁棒性,采用Hough变换算法提取电力线并且使用Kmeans++聚类方法求取电塔偏移角度,提高了电力线提取的准确性。At present, the implementation method of unsupervised power line detection algorithm is to regard power lines as straight lines, remove noise through Gaussian filtering method, use Canny operator for edge detection, extract object edges, and then combine Hough transform algorithm to extract straight lines in the image. Finally, connect the power lines through parallel constraints and straight line grouping methods. Among them, the Canny edge detection algorithm has the characteristics of few calculation steps and easy implementation, but due to environmental interference such as noise, roads and trees, there will be problems of pseudo edges and missing edges, and double edges are prone to appear in power line detection, affecting the accuracy of edge positioning. The Hough transform algorithm has good anti-interference characteristics, but it has high time and space complexity, only detects the direction of the straight line, loses the information of the length of the straight line, and in complex backgrounds, it is interfered by trees and ridges, and the performance is significantly affected. The power lines cannot be fully detected, and irrelevant line segments will be detected. The embodiment of the present application improves the Canny edge detection algorithm based on the image features of aerial images, introduces 45° and 135° gradient templates, and at the same time, based on the numerical relationship between high and low thresholds in the traditional Canny edge detection algorithm, obtains the optimal dual threshold through an iterative method, thereby improving the accuracy and robustness of edge detection, adopts the Hough transform algorithm to extract power lines, and uses the Kmeans++ clustering method to obtain the tower offset angle, thereby improving the accuracy of power line extraction.
通过应用本实施例的技术方案,根据坐标预测模型得到电塔预测坐标。对输电线路标准化图像进行图像预处理,获得输电线路预处理图像。对Canny边缘检测算法进行改进,引入第一对角梯度模板及第二对角梯度模板(例如45°、135°梯度模板),计算输电线路预处理图像的梯度值,并根据迭代算法确定最高阈值及最低阈值,保留处于最高阈值及最低阈值之间的梯度值所对应的边缘像素,获得边缘检测结果图像。根据Hough变换算法确定潜在电力线组,以及根据K-means++聚类算法及潜在电力线组计算电塔偏移角度,根据电塔预测坐标确定有效电力线提取区域。对有效电力线提取区域进行直线检测,并将检测出的直线中与电塔偏移角度垂直的直线确定为候选电力线,最终投票确定待检测输电线路的电力线。基于航拍图像的图像特征,对Canny边缘检测算法进行改进,引入45°、135°梯度模板,使像素周围的8个像素四个方向梯度值得到充分考虑,针对传统Canny边缘检测算法中高低阈值的数值关系,通过迭代方法获取最优双阈值,提高了边缘检测的精度和鲁棒性,提高了电力线提取的准确性。By applying the technical solution of this embodiment, the predicted coordinates of the tower are obtained according to the coordinate prediction model. The standardized image of the transmission line is preprocessed to obtain the preprocessed image of the transmission line. The Canny edge detection algorithm is improved, and the first diagonal gradient template and the second diagonal gradient template (for example, 45° and 135° gradient templates) are introduced to calculate the gradient value of the preprocessed image of the transmission line, and the highest threshold and the lowest threshold are determined according to the iterative algorithm, and the edge pixels corresponding to the gradient values between the highest threshold and the lowest threshold are retained to obtain the edge detection result image. The potential power line group is determined according to the Hough transform algorithm, and the tower offset angle is calculated according to the K-means++ clustering algorithm and the potential power line group, and the effective power line extraction area is determined according to the predicted coordinates of the tower. Straight line detection is performed on the effective power line extraction area, and the straight line perpendicular to the tower offset angle among the detected straight lines is determined as the candidate power line, and finally the power line of the transmission line to be detected is determined by voting. Based on the image features of aerial images, the Canny edge detection algorithm is improved by introducing 45° and 135° gradient templates, so that the gradient values of the four directions of the eight pixels around the pixel are fully considered. According to the numerical relationship between the high and low thresholds in the traditional Canny edge detection algorithm, the optimal dual threshold is obtained through an iterative method, which improves the precision and robustness of edge detection and the accuracy of power line extraction.
进一步的,作为上述实施例具体实施方式的细化和扩展,为了完整说明本实施例的具体实施过程,提供了另一种电力线提取方法,如图3所示,该方法包括:Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another power line extraction method is provided, as shown in FIG3, the method includes:
步骤301,获取待检测输电线路对应的输电线路标准化图像,根据坐标预测模型对所述输电线路标准化处图像进行电塔及绝缘子坐标预测,得到电塔预测坐标、绝缘子预测坐标及绝缘子预测中心点。Step 301, obtain a transmission line standardized image corresponding to the transmission line to be detected, and predict the tower and insulator coordinates of the transmission line standardized image according to the coordinate prediction model to obtain the tower predicted coordinates, insulator predicted coordinates and insulator predicted center point.
步骤302,对所述输电线路标准化图像进行边缘检测,获得边缘检测结果图像,基于所述边缘检测结果图像计算电塔偏移角度。Step 302: Perform edge detection on the standardized image of the power transmission line to obtain an edge detection result image, and calculate the tower offset angle based on the edge detection result image.
在本申请上述实施例中,获取待检测输电线路对应的输电线路标准化图像,根据坐标预测模型对所述输电线路标准化处图像进行电塔及绝缘子坐标预测,以便获得电塔预测坐标、绝缘子预测坐标及绝缘子预测中心点。对输电线路标准化图像进行边缘检测,获得边缘检测结果图像,基于边缘检测结果图像计算电塔偏移角度,为后续电力线提取做准备。In the above embodiment of the present application, a transmission line standardized image corresponding to the transmission line to be detected is obtained, and the tower and insulator coordinates are predicted for the transmission line standardized image according to the coordinate prediction model, so as to obtain the tower prediction coordinates, the insulator prediction coordinates and the insulator prediction center point. Edge detection is performed on the transmission line standardized image to obtain an edge detection result image, and the tower offset angle is calculated based on the edge detection result image to prepare for subsequent power line extraction.
步骤303,根据所述电塔预测坐标,在所述输电线路标准化图像中确定电塔定位框,并根据电塔方向和所述电塔偏移角度θ2对所述电塔定位框进行旋转,并以旋转后的电塔定位框的中心点为中心,按预设放大系数对所述旋转后的电塔定位框进行放大,获得电塔偏移框,其中,所述电塔定位框为矩形。Step 303: determine a tower positioning frame in the standardized image of the transmission line according to the predicted coordinates of the tower, rotate the tower positioning frame according to the tower direction and the tower offset angle θ2 , and magnify the rotated tower positioning frame according to a preset magnification factor with the center point of the rotated tower positioning frame as the center to obtain a tower offset frame, wherein the tower positioning frame is a rectangle.
步骤304,根据所述电塔偏移框的对角,确定第一延伸点及第二延伸点,根据所述第一延伸点及所述第二延伸点确定有效电力线提取区域。Step 304: determine a first extension point and a second extension point according to the diagonal corners of the tower offset frame, and determine an effective power line extraction area according to the first extension point and the second extension point.
具体的,根据电塔预测坐标在输电线路标准化图像中确定电塔定位框,并通过旋转电塔定位框并增加一定的偏移量来得到电力线范围(有效电力线提取区域),具体的,将电塔定位框根据电塔偏移角度θ2进行旋转,特别地,在进行旋转时需要区分电塔在图像中的朝向,以在旋转后的电塔定位框内能够显示电塔整体,以免漏检。对电塔定位框矩形的四个点增加预设偏移量,或者以旋转后的电塔定位框的中心点为中心,按预设放大系数对所述旋转后的电塔定位框进行放大,获得电塔偏移框,前述预设偏移量根据检测线路的不同具体设置,根据所述电塔偏移框的对角,确定第一延伸点及第二延伸点,(左上角点和右下角点,或右上角和左下脚),以便根据第一延伸点及第二延伸点确定有效电力线提取区域。Specifically, the tower positioning frame is determined in the standardized image of the transmission line according to the predicted coordinates of the tower, and the power line range (effective power line extraction area) is obtained by rotating the tower positioning frame and adding a certain offset. Specifically, the tower positioning frame is rotated according to the tower offset angle θ2. In particular, when rotating, it is necessary to distinguish the direction of the tower in the image so that the tower as a whole can be displayed in the rotated tower positioning frame to avoid missed detection. The four points of the tower positioning frame rectangle are added with a preset offset, or the rotated tower positioning frame is enlarged according to the preset magnification factor with the center point of the rotated tower positioning frame as the center to obtain the tower offset frame. The preset offset is specifically set according to different detection lines. According to the diagonal of the tower offset frame, the first extension point and the second extension point (the upper left corner point and the lower right corner point, or the upper right corner and the lower left foot) are determined so as to determine the effective power line extraction area according to the first extension point and the second extension point.
在确定有效电力线提取区域后可以进行验证,具体的,对于空间中的一个点,可以确定它是在直线的左侧还是右侧。假设直线有其上的两个点A(x1,y1),B(x2,y2),并且直线方向从A指向B,那么直线可以表示为:After determining the effective power line extraction area, verification can be performed. Specifically, for a point in space, it can be determined whether it is on the left or right side of the line. Assuming that the line has two points A (x 1 , y 1 ) and B (x 2 , y 2 ) on it, and the direction of the line points from A to B, then the line can be expressed as:
αx+βy+γ=0αx+βy+γ=0
其中,α为y2-y1,β为x2-x1,γ为x2*y1-x1*y2。Among them, α is y 2 -y 1 , β is x 2 -x 1 , and γ is x 2 *y 1 -x 1 *y 2 .
C=αxd+βyp+γC=αx d +βy p +γ
检测人员可以通过计算C确定空间中某点D(xd,yd)在直线的哪一侧。The inspector can calculate C to determine which side of the line a point D (x d , y d ) in space is on.
步骤305,根据LSD直线检测算法对所述有效电力线提取区域进行直线检测,获得待拟合候选电力线段,将所述待拟合候选电力线段放入线段池中。Step 305 , performing line detection on the effective power line extraction area according to the LSD line detection algorithm to obtain candidate power line segments to be fitted, and putting the candidate power line segments to be fitted into a line segment pool.
步骤306,根据所述线段池中各待拟合候选电力线段之间的距离,将小于预设距离阈值的待拟合候选电力线段放入待拟合候选电力线段组。Step 306 : according to the distances between the candidate power line segments to be fitted in the line segment pool, the candidate power line segments to be fitted whose distances are less than a preset distance threshold are put into a candidate power line segment group to be fitted.
步骤307,根据最小二乘法拟合所述待拟合候选电力线段组中的全部待拟合候选电力线段,获得拟合直线,将所述拟合直线中与所述电塔偏移角度垂直的拟合直线,确定为候选电力线。Step 307, fitting all the candidate power line segments in the candidate power line segment group to be fitted according to the least square method to obtain fitting straight lines, and determining the fitting straight lines perpendicular to the tower offset angle among the fitting straight lines as candidate power lines.
在有效电力线提取区域中,使用LSD直线检测算法进行线检测,LSD是一种用于直线的局部提取算法,其优点是比Hough变换算法更快,并且被设计为在数字图像上为无参数的。但缺点是,由于局部检测算法的自增长性质、遮挡和局部模糊等原因,长线段经常被切割成多条直线,而这在Hough变换算法中是不存在的。选择LSD直线检测算法是因为它可以适应各种复杂的环境,而无需参数调整,并且直线检测优于Hough变换算法。In the effective power line extraction area, the LSD line detection algorithm is used for line detection. LSD is a local extraction algorithm for lines. Its advantages are that it is faster than the Hough transform algorithm and is designed to be parameter-free on digital images. However, due to the self-increase nature of the local detection algorithm, occlusion and local blur, long line segments are often cut into multiple straight lines, which does not exist in the Hough transform algorithm. The LSD line detection algorithm is selected because it can adapt to various complex environments without parameter adjustment, and line detection is better than the Hough transform algorithm.
根据LSD直线检测算法对所述有效电力线提取区域进行直线检测,获得待拟合候选电力线段,并对待拟合候选电力线段进行滤波和合并,具体的,将所述待拟合候选电力线段放入线段池中。在线段池中,通过设置预设距离阈值合并一些接近的线段,并且将距离小于距离阈值的线段分成一组(根据所述线段池中各待拟合候选电力线段之间的距离,将小于预设距离阈值的待拟合候选电力线段放入待拟合候选电力线段组),预设距离阈值例如可以设置为7个像素值,各待拟合候选电力线段之间的距离可以用如下公式计算:According to the LSD straight line detection algorithm, the effective power line extraction area is detected to obtain the candidate power line segments to be fitted, and the candidate power line segments to be fitted are filtered and merged. Specifically, the candidate power line segments to be fitted are placed in a line segment pool. In the line segment pool, some close line segments are merged by setting a preset distance threshold, and the line segments with a distance less than the distance threshold are divided into a group (according to the distance between each candidate power line segment to be fitted in the line segment pool, the candidate power line segments to be fitted with a distance less than the preset distance threshold are placed in the candidate power line segment group to be fitted), the preset distance threshold can be set to 7 pixel values, for example, and the distance between each candidate power line segment to be fitted can be calculated using the following formula:
式中k为当前线段的斜率,I是截距,进而得到每条线的线段组,然后通过最小二乘法拟合直线,并选取与Kmeans++聚类得到的电塔角度近似垂直的直线作为候选电力线。Where k is the slope of the current line segment, I is the intercept, and then the line segment group of each line is obtained. Then, the straight line is fitted by the least squares method, and the straight line that is approximately perpendicular to the tower angle obtained by Kmeans++ clustering is selected as the candidate power line.
步骤308,根据绝缘子预测坐标,在待检测输电线路对应的电塔标准模板库中,获取电塔标准图像,根据预设电力线模板,将所述电塔标准图像映射到输电线路标准化图像后,根据绝缘子预测中心点与候选电力线的距离对候选电力线进行投票,根据投票结果确定待检测输电线路的电力线,其中,所述预设电力线模板通过计算输电线路标准化图像映射到电塔标准图像的单应矩阵获得。Step 308, according to the predicted coordinates of the insulator, obtain a standard image of the tower in the standard template library of the tower corresponding to the transmission line to be detected, map the standard image of the tower to the standardized image of the transmission line according to the preset power line template, vote for the candidate power lines according to the distance between the predicted center point of the insulator and the candidate power lines, and determine the power lines of the transmission line to be detected according to the voting results, wherein the preset power line template is obtained by calculating the homography matrix of mapping the standardized image of the transmission line to the standard image of the tower.
在计算机视觉中,单应性本质上是一种存在于图像变换之间的性质,根据变换性质的不同可以分为刚性变换、仿射变换和投影变换。其中,刚性变换是指只包含平移和旋转的变换形式,只改变原图的位置和方向,而不改变形状,仿射变换相比于刚性变换进一步改变了图像的形状,但在变换的过程中保持原图形的平行关系。In computer vision, homography is essentially a property that exists between image transformations. According to the different transformation properties, it can be divided into rigid transformation, affine transformation and projective transformation. Among them, rigid transformation refers to a transformation form that only contains translation and rotation, which only changes the position and direction of the original image without changing the shape. Compared with rigid transformation, affine transformation further changes the shape of the image, but maintains the parallel relationship of the original image during the transformation process.
平面之间的变换性质实质是点的位置变化,可以通过矩阵表示,假设原平面中的点Q通过投影变换后成为另外一个平面中的Q′,通过单应性约束,该点在两个平面之间的对应关系可以表示为:The transformation property between planes is essentially the change in the position of a point, which can be represented by a matrix. Assuming that point Q in the original plane becomes Q′ in another plane after projection transformation, the correspondence between the point in the two planes can be expressed as follows through the homography constraint:
Q′=AQQ′=AQ
其中,A称为单应矩阵,一般为3*3的大小,展开后两点之间的变换可以表示为:Among them, A is called the homography matrix, which is generally 3*3 in size. After expansion, the transformation between two points can be expressed as:
根据具体变换过程不同,单应矩阵中各个参数的取值也不同,通常情形中,需要关注如何求取矩阵A,这样对于原平面中任意一点,都可以通过单应矩阵计算出该点在另外一个平面上的位置。Depending on the specific transformation process, the values of the parameters in the homography matrix are also different. In general, we need to pay attention to how to obtain the matrix A, so that for any point in the original plane, the position of the point on another plane can be calculated through the homography matrix.
将Q′=AQ展开得到三个等式如下:Expand Q′=AQ to get the following three equations:
x′=a11x+a12y+a13 x′=a 11 x+a 12 y+a 13
y′=a21x+a22y+a23 y′=a 21 x+a 22 y+a 23
1=a31x+a32y+11=a 31 x+a 32 y+1
相乘后,获得:After multiplication, we get:
xa11+ya12+a13-xx′a31-yx′a32=x′xa 11 +ya 12 +a 13 -xx′a 31 -yx′a 32 =x′
xa21+ya22+a23-xy′a31-yy′a32=y′xa 21 +ya 22 +a 23 -xy′a 31 -yy′a 32 =y′
最终统一表示为矩阵形式Ba=b,即:The final unified expression is in the matrix form Ba=b, that is:
式中有8个未知量,由一对匹配点对可以得到两个等式,根据多项式理论,至少需要四对匹配点对才能对单应矩阵进行求解,将两边同时乘以BT,再利用逆矩阵性质进行移项,得到a的求解公式为:There are 8 unknowns in the formula. Two equations can be obtained from a pair of matching points. According to polynomial theory, at least four pairs of matching points are required to solve the homography matrix. Multiply both sides by B T at the same time, and then use the properties of the inverse matrix to move the terms, and the solution formula for a is:
BTBa=BTbB T Ba = B T b
a=(BTB)-1BTba=(B T B) -1 B T b
对于多张同一地点的多视角航拍图像,单应性的前提是不同视角下的两个平面空间在实际空间中属于同一平面,对单应矩阵的求解首先需要在不同视角下找到一个公共平面。而对于航拍电力线图像(输电线路标准化图像)来说,电塔和绝缘子所在部分的平面满足这一条件,因此本申请实施例根据标定的绝缘子检测框中心的位置(待检测输电线路对应的电塔标准模板库中获取的电塔标准图像)和坐标预测模型预测出的绝缘子预测坐标中心点位置计算不同视角下的单应矩阵,分别在两幅电力线图像(同一个电塔对应的电塔标准图像及输电线路标准化图像)中进行匹配点对选择,为了使单应矩阵计算更加精确和充分使用检测信息,选择六对匹配点进行单应矩阵计算。For multiple multi-view aerial images of the same location, the premise of homography is that two plane spaces under different viewpoints belong to the same plane in the actual space. To solve the homography matrix, it is first necessary to find a common plane under different viewpoints. For aerial power line images (standardized images of transmission lines), the planes of the parts where the towers and insulators are located meet this condition. Therefore, the embodiment of the present application calculates the homography matrix under different viewpoints based on the position of the center of the calibrated insulator detection frame (the tower standard image obtained from the tower standard template library corresponding to the transmission line to be detected) and the position of the center point of the predicted coordinates of the insulator predicted by the coordinate prediction model, and selects matching point pairs in two power line images (the tower standard image and the transmission line standardized image corresponding to the same tower). In order to make the homography matrix calculation more accurate and make full use of the detection information, six pairs of matching points are selected for the homography matrix calculation.
为了验证所求取单应矩阵的准确性,本申请实施例在两个视角间,通过单应矩阵将标准模板中实际框(电塔标准图像)的中心点映射到输电线路标准化图像中,对比绝缘子预测坐标中心点坐标与映射的标准的绝缘子中心点坐标进行对比,显示映射后的标准绝缘子中心点坐标与绝缘子预测坐标中心点坐标之间的误差较小。因此,将标准模板中绝缘子坐标通过单应变换映射到待检测电力线图像中,对电力线候选组按绝缘子中心点与电力线距离进行投票,获取对应的电力线。In order to verify the accuracy of the obtained homography matrix, the embodiment of the present application maps the center point of the actual frame (standard image of the electric tower) in the standard template to the standardized image of the transmission line through the homography matrix between two viewing angles, and compares the coordinates of the center point of the predicted insulator coordinates with the mapped standard insulator center point coordinates, showing that the error between the mapped standard insulator center point coordinates and the insulator predicted coordinate center point coordinates is small. Therefore, the insulator coordinates in the standard template are mapped to the image of the power line to be detected through homography transformation, and the power line candidate group is voted according to the distance between the insulator center point and the power line to obtain the corresponding power line.
通过应用本实施例的技术方案,首先,进行图像标准化操作,对获取的无人机航拍图像进行裁剪、归一化。其次,对图像进行预处理,使用坐标预测模型,得到电力塔位置(电塔预测坐标),对输电线路标准化图像进行灰度化、直方图均衡化的图像预处理,得到干扰较少的图像,结合电塔位置信息,使用高斯滤波去除电力塔范围外背景信息(输电线路预处理图像)。再次,对输电线路预处理图像进行边缘检测,使用改进后的Canny边缘检测算法获得准确、清晰的图像边缘。最后,结合先验知识对电力线进行提取,边缘检测后图像使用K-means聚类获取电力塔角度(电塔偏移角度),并通过旋转电塔定位框并增加一定的偏移量来得到电力线范围(有效电力线提取区域),再滤除电力线范围外的环境干扰,之后使用LSD直线检测算法检测电力线,最后,进行直线合并,选取与电塔偏移角度近似垂直的直线,即为航拍图像中的候选电力线,并结合电力线模板和单应矩阵,投票确定电力线所在直线,提高了电力线提取的准确性。By applying the technical solution of this embodiment, first, perform image standardization operations, and crop and normalize the acquired drone aerial images. Secondly, preprocess the image, use the coordinate prediction model to obtain the power tower position (power tower prediction coordinates), perform grayscale and histogram equalization image preprocessing on the standardized image of the transmission line to obtain an image with less interference, and combine the tower position information to use Gaussian filtering to remove background information outside the power tower range (transmission line preprocessed image). Thirdly, perform edge detection on the transmission line preprocessed image, and use the improved Canny edge detection algorithm to obtain accurate and clear image edges. Finally, the power lines are extracted based on prior knowledge. The image after edge detection uses K-means clustering to obtain the angle of the power tower (tower offset angle), and the power line range (effective power line extraction area) is obtained by rotating the tower positioning frame and adding a certain offset. The environmental interference outside the power line range is filtered out, and the LSD line detection algorithm is used to detect the power lines. Finally, the lines are merged, and the lines that are approximately perpendicular to the tower offset angle are selected as candidate power lines in the aerial image. The power line template and the homography matrix are combined to vote to determine the line where the power line is located, thereby improving the accuracy of power line extraction.
在本申请实施例中,可选地,所述坐标预测模型为对YOLOv7模型的改进模型,所述坐标预测模型通过将YOLOv7模型中的SiLU激活函数替换为Mish激活函数,以及将YOLOv7模型中的CIou损失函数替换为SIoU损失函数获得。In an embodiment of the present application, optionally, the coordinate prediction model is an improved model of the YOLOv7 model, and the coordinate prediction model is obtained by replacing the SiLU activation function in the YOLOv7 model with the Mish activation function, and replacing the CIou loss function in the YOLOv7 model with the SIoU loss function.
在本申请实施例中,可选地,坐标预测模型的训练方法为获取包含电塔的多个数据集基础图像,对所述数据集基础图像进行标准化处理后,获得数据集标准化图像,通过预设数据标注工具对所述数据集标准化图像中的电塔及电塔包含的绝缘子进行标注,生成电塔定位数据集;对所述电塔定位数据集通过均匀随机抽样的方式,将所述电塔定位数据集无交集地划分为预设第一比例的电塔定位训练数据集、预设第二比例的电塔定位测试数据集及预设第三比例的电塔定位验证数据集;将所述电塔定位训练数据集、所述电塔定位测试数据集及所述电塔定位验证数据集输入坐标预测模型进行训练,获得训练后的坐标预测模型。In an embodiment of the present application, optionally, a method for training a coordinate prediction model is to obtain a plurality of basic images of a data set including electric towers, perform standardization processing on the basic images of the data set to obtain a standardized image of the data set, and use a preset data annotation tool to annotate the electric towers and insulators contained in the standardized image of the data set to generate an electric tower positioning data set; divide the electric tower positioning data set into a tower positioning training data set of a preset first ratio, a tower positioning test data set of a preset second ratio, and a tower positioning verification data set of a preset third ratio without intersection by uniform random sampling; input the tower positioning training data set, the tower positioning test data set, and the tower positioning verification data set into a coordinate prediction model for training to obtain a trained coordinate prediction model.
监督学习电力线检测方法实现途径为建立卷积神经网络模型,构建人工标注电力线数据集,将预处理好的航拍电力线数据集图像进行特征提取和分类,通过结构化信息对特征图进行过滤,获取电力线信息。The supervised learning power line detection method is implemented by establishing a convolutional neural network model, constructing a manually annotated power line dataset, extracting and classifying the preprocessed aerial power line dataset images, filtering the feature map through structured information, and obtaining power line information.
监督学习方法中,Mask R-CNN和Fast R-CNN分为两个步骤,产生候选框、CNN提取特征、生成分类、边框回归,R-CNN系列可通过对网络进行优化来不断提高精度,但是两个检测步骤降低了检测速度,计算负荷高。YOLO系列将输入图片分为S*S网格,设定网格的K个预测边界框和C个目标分类得分,之后根据K个预测框置信度和C个目标边界框按最终得分高低排序,将得分最高网格作为最终预测结果,实验结果显示,YOLO网络比Fast R-CNN网络运行时间快了42倍,时间比Faster R-CNN领先两倍,但是由于每一个网格只输出一个结果,在网格划分过大或者航拍图像中电力线目标过小时,会出现误判和漏检。监督学习方法进行电力线检测时,对数据集质量要求较高,大多数电力线数据集为非公开数据集,且公开数据集中对于电力线断股、异物悬挂、烟火警情等图像过少,这种情况导致使用监督学习方法进行训练难以达到符合电力系统安全稳定运行的检测要求。In supervised learning methods, Mask R-CNN and Fast R-CNN are divided into two steps: generating candidate boxes, CNN extracting features, generating classifications, and bounding box regression. The R-CNN series can continuously improve accuracy by optimizing the network, but the two detection steps reduce the detection speed and have a high computational load. The YOLO series divides the input image into S*S grids, sets K predicted bounding boxes and C target classification scores for the grid, and then sorts the K predicted box confidences and C target bounding boxes by the final score, and uses the grid with the highest score as the final prediction result. Experimental results show that the YOLO network runs 42 times faster than the Fast R-CNN network and twice as fast as the Faster R-CNN network. However, since each grid only outputs one result, misjudgment and missed detection may occur when the grid is too large or the power line target in the aerial image is too small. When using supervised learning methods for power line detection, high requirements are placed on the quality of the data set. Most power line data sets are non-public data sets, and there are too few images of broken power lines, hanging foreign objects, fireworks, etc. in the public data sets. This makes it difficult to use supervised learning methods for training to meet the detection requirements for safe and stable operation of the power system.
本申请上述实施例中,针对航拍所得高压输电线图像制作数据集,将航拍图像(包含电塔的多个数据集基础图像)中心为参考点截取1280×1280、640×640大小图像,统一归一化为640×640,并采用labelme对图像中电力塔进行标注,生成数据集标准化图像(数据集),由于航拍图像包含多种背景,所有航拍图像均来自无人机沿线航拍,具体的数据集,例如可以包括:草地背景(400张)、森林背景(500张)、农田背景(350张)、水域背景(50张)、城市背景(100张)。In the above embodiment of the present application, a data set is produced for the high-voltage transmission line images obtained by aerial photography. The center of the aerial image (including multiple data set basic images of the power tower) is used as a reference point to capture 1280×1280 and 640×640 images, which are normalized to 640×640. Labelme is used to annotate the power towers in the image to generate a data set standardized image (data set). Since the aerial images contain multiple backgrounds, all aerial images are from drones along the line. Specific data sets may include, for example: grassland background (400 images), forest background (500 images), farmland background (350 images), water background (50 images), and city background (100 images).
对数据集进行数据增强,采用间隔45°旋转图像的方式将数据集扩充为16倍原始大小,在之后训练中,使用图像权重系数,在训练过程中根据标签盒的数量来选择图像,如果标签盒的数目越多,权重就越大,被采样的概率也会相应增加。对于标签分配,与YOLOv7模型一致,采用SimOTA策略,并在训练过程中自适应地动态地将k个正样本分配给每个标签盒,相比OTA,显著减少了训练时间。The dataset is augmented by rotating the image at intervals of 45° to expand it to 16 times its original size. In subsequent training, the image weight coefficient is used to select images according to the number of label boxes during training. The more label boxes there are, the greater the weight, and the probability of being sampled will increase accordingly. For label allocation, consistent with the YOLOv7 model, the SimOTA strategy is adopted, and k positive samples are adaptively and dynamically allocated to each label box during training, which significantly reduces the training time compared to OTA.
其次,将所述电塔定位数据集无交集地划分为预设第一比例的电塔定位训练数据集、预设第二比例的电塔定位测试数据集及预设第三比例的电塔定位验证数据集,例如可以将训练集(电塔定位训练数据集)、测试集(电塔定位测试数据集)、验证集(电塔定位验证数据集)的比例设定为6:2:2,最后将处理好的数据集中640×640×3图像输入YOLOv7网络。Secondly, the tower positioning data set is divided into a tower positioning training data set of a preset first ratio, a tower positioning test data set of a preset second ratio, and a tower positioning verification data set of a preset third ratio without intersection. For example, the ratio of the training set (tower positioning training data set), the test set (tower positioning test data set), and the verification set (tower positioning verification data set) can be set to 6:2:2. Finally, the 640×640×3 image in the processed data set is input into the YOLOv7 network.
YOLOv7网络分为Backbone和Head两部分,Backbone由Conv卷积模块、ELAN模块、MP-1模块,YOLOv7中Conv并非普通卷积层,它是由普通二维卷积、BN层、SiLU激活函数组成,Head由Conv卷积模块、SPPCSPC模块、MP-2模块、Detect模块组成。The YOLOv7 network is divided into two parts: Backbone and Head. Backbone consists of Conv convolution module, ELAN module, and MP-1 module. Conv in YOLOv7 is not an ordinary convolution layer. It is composed of ordinary two-dimensional convolution, BN layer, and SiLU activation function. Head consists of Conv convolution module, SPPCSPC module, MP-2 module, and Detect module.
SiLU激活函数是一种机器学习中常用的Sigmoid加权线性组合函数The SiLU activation function is a Sigmoid weighted linear combination function commonly used in machine learning.
SiLU(x)=x*Sigmoid(x)SiLU(x)=x*Sigmoid(x)
通过输入x与Sigmoid函数线性组合来得到,它具有无上界、有下界、平滑、不单调的优秀特性,无上界避免了由上限引起的饱和,并有效减少梯度的消失,有下界可以减少过拟合,并有一定正则化效果,非单调保证了负输入产生的负输出,提高网络表达能力。It is obtained by linearly combining the input x and the Sigmoid function. It has the excellent characteristics of no upper bound, lower bound, smoothness, and non-monotonicity. No upper bound avoids the saturation caused by the upper bound and effectively reduces the disappearance of the gradient. The lower bound can reduce overfitting and has a certain regularization effect. Non-monotonicity ensures that negative input produces negative output, thereby improving the network's expression ability.
大量实验表明,Mish激活函数A large number of experiments have shown that the Mish activation function
Mish(x)=x*tanh(ln(1+ex))Mish(x)=x*tanh(ln(1+e x ))
具有和SiLU函数几乎相同的特性,并且有更好的准确性,本发明基于YOLOv7模型,将Conv中的SiLU激活函数替换为Mish激活函数,本申请事实来中的数据集通过更换激活函数,提高了1%的mAP值。The invention has almost the same characteristics as the SiLU function and has better accuracy. The present invention is based on the YOLOv7 model and replaces the SiLU activation function in Conv with the Mish activation function. The data set in the present application improves the mAP value by 1% by replacing the activation function.
目标检测损失函数主要由两部分组成:分类损失和回归定位损失。回归定位损失作为目标检测损失函数中不可或缺的一部分,YOLOv7使用的损失函数是CIoU,它考虑了三个几何参数:重叠面积、中心点距离和纵横比,在DIoU函数基础上增加了长度和宽度的损失,CIoU损失函数公式为:The target detection loss function mainly consists of two parts: classification loss and regression positioning loss. As an indispensable part of the target detection loss function, the loss function used by YOLOv7 is CIoU, which considers three geometric parameters: overlapping area, center point distance and aspect ratio. On the basis of DIoU function, the length and width losses are added. The CIoU loss function formula is:
其中,α是权重参数,ρ是两点之间的欧几里得距离,v是预测框和目标框的高宽比一致性,v的计算方法公式为:Among them, α is the weight parameter, ρ is the Euclidean distance between two points, v is the aspect ratio consistency of the prediction box and the target box, and the calculation formula of v is:
其中wgt、hgt、w、h分别表示真实框和预测框的宽和高。Where w gt , h gt , w, h represent the width and height of the real box and the predicted box respectively.
CIou函数并未考虑角度问题,使得收敛速度慢且效率低,因此,引入SIoU函数,将预测框和真实框的匹配方向引入,加快模型收敛,SIoU函数由四个代价函数构成,角度代价函数定义为公式如下:The CIou function does not consider the angle problem, which makes the convergence slow and inefficient. Therefore, the SIoU function is introduced to introduce the matching direction of the predicted box and the real box to speed up the convergence of the model. The SIoU function consists of four cost functions. The angle cost function is defined as follows:
其中,分别代表真实框和预测框的中心坐标,in, Represent the center coordinates of the real box and the predicted box respectively,
由于引入角度损耗,所以对距离代价函数进行修改,公式如下:Due to the introduction of angle loss, the distance cost function is modified and the formula is as follows:
这里的ρx和ρy和γ分别为:Here ρ x , ρ y and γ are:
γ=2-Λγ=2-Λ
其中,cw和ch分别为真实框预测框的最小边界矩形的宽和高,形状代价函数定义公式为:Among them, cw and ch are the width and height of the minimum bounding rectangle of the real box prediction box, respectively, and the shape cost function is defined as:
这里的ww、wh分别为:Here w w and w h are:
最后定义IOU代价函数为公式为:Finally, the IOU cost function is defined as:
其中,B和BGT分别表示候选框和标准框,最终得到SiOU损失函数公式为:Among them, B and B GT represent the candidate box and the standard box respectively, and the final SiOU loss function formula is:
为此,将改进后的YOLOv7模型对数据集进行训练,获取电力塔、绝缘子的预测框中心点、宽、高。通过对获取的无人机航拍图像进行裁剪、归一化(进行图像标准化操作),再进行图像预处理,使用改进的YOLOv7网络对数据集进行训练,使用Mish激活函数替代了SiLU激活函数,有效减少梯度的消失,减少过拟合现象,并且有一定的正则化效果的同时允许负输出,提高网络的表达能力,加快了模型的收敛和准确性,使用SIoU损失函数替代CIou损失函数,考虑了角度参数,有效提高了训练速度和推理的准确性,使得电塔检测的Map值得到了2%的提升(YOLOv7 0.864,本申请实施例0.881)。To this end, the improved YOLOv7 model is used to train the data set to obtain the center point, width, and height of the prediction box of the power tower and insulator. The acquired drone aerial images are cropped and normalized (image standardization operation is performed), and then image preprocessing is performed. The improved YOLOv7 network is used to train the data set, and the Mish activation function is used to replace the SiLU activation function, which effectively reduces the disappearance of the gradient and the overfitting phenomenon. It has a certain regularization effect and allows negative output, improves the expression ability of the network, and accelerates the convergence and accuracy of the model. The SIoU loss function is used to replace the CIou loss function, and the angle parameter is considered. The training speed and the accuracy of reasoning are effectively improved, so that the Map value of the tower detection is improved by 2% (YOLOv7 0.864, this application embodiment 0.881).
通过应用本实施例的技术方案,对YOLOv7网络模型、Canny边缘检测算法、Hough变换算法及电力线提取方法进行改进,YOLO模型是经典的单阶段检测网络,具有运行速度快,内存占比小的特点,但是检测精度并不理想,通过结合YOLOv7网络进行改进,用Mish激活函数代替原有激活函数,使用SIoU作为损失函数,将角度项添加到先前的损失函数中,加快模型收敛,提高模型对电力塔的检测性能,同时采用LSD线检测进行直线检测,并进行直线筛选和最小二乘连接得到候选电力线,基于检测的直线特征信息,如长度、宽度、方向信息,通过电力线的结构信息以及YOLOv7电力塔检测结果,采用旋转电塔定位框并增加偏移量方式确定电力线范围(有效电力线提取区域),过滤掉电力线范围外杂乱直线,最后通过YOLOv7检测的电力塔和绝缘子的预测框中心点、宽、高信息,结合标准模板(预设电力线模板)进行投影变换,对候选电力线与各个绝缘子按距离进行投票,得到最终电力线。By applying the technical solution of this embodiment, the YOLOv7 network model, Canny edge detection algorithm, Hough transform algorithm and power line extraction method are improved. The YOLO model is a classic single-stage detection network with the characteristics of fast running speed and small memory usage, but the detection accuracy is not ideal. By combining the YOLOv7 network for improvement, the Mish activation function is used to replace the original activation function, SIoU is used as the loss function, and the angle term is added to the previous loss function to accelerate the model convergence and improve the model's detection performance for power towers. At the same time, LSD line detection is used for straight line detection , and perform straight line screening and least square connection to obtain candidate power lines. Based on the detected straight line feature information, such as length, width, and direction information, the structural information of the power line and the YOLOv7 power tower detection results are used to determine the power line range (effective power line extraction area) by rotating the tower positioning frame and increasing the offset, and filter out the messy straight lines outside the power line range. Finally, the center point, width, and height information of the predicted frame of the power tower and insulator detected by YOLOv7 are combined with the standard template (preset power line template) for projection transformation, and the candidate power lines and each insulator are voted according to the distance to obtain the final power line.
进一步的,作为图1方法的具体实现,本申请实施例提供了一种电力线提取装置,如图4所示,该装置包括:Further, as a specific implementation of the method of FIG. 1 , an embodiment of the present application provides a power line extraction device, as shown in FIG. 4 , the device includes:
电塔坐标预测模块401,用于获取待检测输电线路对应的输电线路标准化图像,根据坐标预测模型对所述输电线路标准化处图像进行电塔坐标预测,得到电塔预测坐标;The power tower coordinate prediction module 401 is used to obtain a transmission line standardized image corresponding to the transmission line to be detected, and perform power tower coordinate prediction on the transmission line standardized image according to a coordinate prediction model to obtain power tower predicted coordinates;
电塔角度计算模块402,用于对所述输电线路标准化图像进行边缘检测,获得边缘检测结果图像,基于所述边缘检测结果图像计算电塔偏移角度;The tower angle calculation module 402 is used to perform edge detection on the standardized image of the power transmission line to obtain an edge detection result image, and calculate the tower offset angle based on the edge detection result image;
有效区域确定模块403,用于根据所述电塔预测坐标,在所述输电线路标准化图像中确定电塔定位框,并根据所述电塔定位框及所述电塔偏移角度,确定有效电力线提取区域;An effective area determination module 403 is used to determine an electric tower positioning frame in the standardized image of the power transmission line according to the predicted coordinates of the electric tower, and determine an effective power line extraction area according to the electric tower positioning frame and the electric tower offset angle;
电力线提取模块404,用于对所述有效电力线提取区域进行直线检测,并将检测出的直线中与所述电塔偏移角度垂直的直线确定为候选电力线,根据预设电力线模板对所述候选电力线进行投票,根据投票结果确定待检测输电线路的电力线。The power line extraction module 404 is used to perform straight line detection on the effective power line extraction area, and determine the straight lines that are perpendicular to the tower offset angle among the detected straight lines as candidate power lines, vote on the candidate power lines according to the preset power line template, and determine the power lines of the transmission line to be detected according to the voting results.
可选地,电塔角度计算模块402,还用于:Optionally, the tower angle calculation module 402 is further used for:
根据Hough变换算法计算所述边缘检测结果图像对应的潜在电力线及潜在电力线斜率,根据所述潜在电力线斜率,确定互相平行的潜在电力线组;Calculate the potential lines of force and the slopes of the potential lines of force corresponding to the edge detection result image according to the Hough transform algorithm, and determine a group of potential lines of force that are parallel to each other according to the slopes of the potential lines of force;
根据K-means++聚类算法对所述潜在电力线组的斜率进行聚类,确定多个类中包含的斜率数量最多的目标类,获取所述目标类的聚类中心斜率作为角度θ1,根据所述角度θ1及电塔偏移角度计算公式计算电塔偏移角度θ2,其中,所述电塔偏移角度计算公式为:The slopes of the potential power line groups are clustered according to the K-means++ clustering algorithm, a target class with the largest number of slopes among the multiple classes is determined, the cluster center slope of the target class is obtained as the angle θ 1 , and the tower offset angle θ 2 is calculated according to the angle θ 1 and the tower offset angle calculation formula, wherein the tower offset angle calculation formula is:
可选地,所述有效区域确定模块403,还用于:Optionally, the effective area determination module 403 is further configured to:
根据电塔方向和所述电塔偏移角度θ2对所述电塔定位框进行旋转,并以旋转后的电塔定位框的中心点为中心,按预设放大系数对所述旋转后的电塔定位框进行放大,获得电塔偏移框;The tower positioning frame is rotated according to the tower direction and the tower offset angle θ2 , and the rotated tower positioning frame is enlarged according to a preset magnification factor with the center point of the rotated tower positioning frame as the center to obtain a tower offset frame;
根据所述电塔偏移框的对角,确定第一延伸点及第二延伸点,根据所述第一延伸点及所述第二延伸点确定有效电力线提取区域。A first extension point and a second extension point are determined according to the diagonal corners of the tower offset frame, and an effective power line extraction area is determined according to the first extension point and the second extension point.
可选地,所述电力线提取模块404,还用于:Optionally, the power line extraction module 404 is further configured to:
根据LSD直线检测算法对所述有效电力线提取区域进行直线检测,获得待拟合候选电力线段,将所述待拟合候选电力线段放入线段池中;Perform straight line detection on the effective power line extraction area according to the LSD straight line detection algorithm to obtain candidate power line segments to be fitted, and put the candidate power line segments to be fitted into a line segment pool;
根据所述线段池中各待拟合候选电力线段之间的距离,将小于预设距离阈值的待拟合候选电力线段放入待拟合候选电力线段组;According to the distances between the candidate power line segments to be fitted in the line segment pool, the candidate power line segments to be fitted whose distances are less than a preset distance threshold are put into a candidate power line segment group to be fitted;
根据最小二乘法拟合所述待拟合候选电力线段组中的全部待拟合候选电力线段,获得拟合直线,将所述拟合直线中与所述电塔偏移角度垂直的拟合直线,确定为候选电力线。All the candidate power line segments to be fitted in the candidate power line segment group to be fitted are fitted according to the least square method to obtain a fitting straight line, and a fitting straight line perpendicular to the tower offset angle among the fitting straight lines is determined as a candidate power line.
可选地,所述电塔坐标预测模块401,还用于:Optionally, the tower coordinate prediction module 401 is further used for:
根据坐标预测模型对所述输电线路标准化处图像进行绝缘子坐标预测,得到绝缘子预测坐标及绝缘子预测中心点。The insulator coordinates are predicted for the transmission line standardization image according to the coordinate prediction model to obtain the insulator prediction coordinates and the insulator prediction center point.
可选地,所述电力线提取模块404,还用于:Optionally, the power line extraction module 404 is further configured to:
根据预设电力线模板,将所述电塔标准图像映射到输电线路标准化图像后,根据绝缘子预测中心点与候选电力线的距离对候选电力线进行投票,根据投票结果确定待检测输电线路的电力线,其中,所述预设电力线模板通过计算输电线路标准化图像映射到电塔标准图像的单应矩阵获得。According to the preset power line template, after mapping the standard image of the power tower to the standardized image of the transmission line, the candidate power lines are voted according to the distance between the predicted center point of the insulator and the candidate power lines, and the power lines of the transmission line to be detected are determined according to the voting results, wherein the preset power line template is obtained by calculating the homography matrix of mapping the standardized image of the transmission line to the standard image of the power tower.
进一步的,本申请实施例提供了另一种电力线提取装置,如图5所示,该装置包括:Furthermore, an embodiment of the present application provides another power line extraction device, as shown in FIG5 , the device includes:
电塔坐标预测模块501,用于获取待检测输电线路对应的输电线路标准化图像,根据坐标预测模型对所述输电线路标准化处图像进行电塔坐标预测,得到电塔预测坐标;The tower coordinate prediction module 501 is used to obtain a transmission line standardized image corresponding to the transmission line to be detected, and perform tower coordinate prediction on the transmission line standardized image according to a coordinate prediction model to obtain tower predicted coordinates;
电塔角度计算模块502,用于对所述输电线路标准化图像进行边缘检测,获得边缘检测结果图像,基于所述边缘检测结果图像计算电塔偏移角度;The tower angle calculation module 502 is used to perform edge detection on the standardized image of the power transmission line to obtain an edge detection result image, and calculate the tower offset angle based on the edge detection result image;
有效区域确定模块503,用于根据所述电塔预测坐标,在所述输电线路标准化图像中确定电塔定位框,并根据所述电塔定位框及所述电塔偏移角度,确定有效电力线提取区域;An effective area determination module 503 is used to determine a tower positioning frame in the standardized image of the power transmission line according to the predicted coordinates of the tower, and determine an effective power line extraction area according to the tower positioning frame and the tower offset angle;
电力线提取模块504,用于对所述有效电力线提取区域进行直线检测,并将检测出的直线中与所述电塔偏移角度垂直的直线确定为候选电力线,根据预设电力线模板对所述候选电力线进行投票,根据投票结果确定待检测输电线路的电力线。The power line extraction module 504 is used to perform straight line detection on the effective power line extraction area, and determine the straight lines that are perpendicular to the tower offset angle among the detected straight lines as candidate power lines, vote on the candidate power lines according to the preset power line template, and determine the power lines of the transmission line to be detected according to the voting results.
线路图像处理模块505,用于对所述输电线路标准化图像中的像素进行灰度调整,获得输电线路灰度化图像,直方图均衡化处理所述输电线路灰度化图像,获得输电线路均衡化图像,根据高斯滤波法对所述输电线路均衡化图像进行去噪处理,获得输电线路预处理图像;在Canny边缘检测算法包含的水平方向梯度模板及垂直方向梯度模板基础上,增加第一对角方向梯度模板及第二对角方向梯度模板后,根据四个方向梯度模板计算所述输电线路预处理图像的梯度值;根据迭代算法,在所述输电线路预处理图像各像素的灰度值中生成最高阈值及最低阈值,保留处于所述最高阈值及所述最低阈值之间的梯度值所对应的边缘像素,获得边缘检测结果图像。The line image processing module 505 is used to adjust the grayscale of pixels in the standardized image of the power transmission line to obtain a grayscale image of the power transmission line, perform histogram equalization on the grayscale image of the power transmission line to obtain a balanced image of the power transmission line, and perform denoising on the balanced image of the power transmission line according to the Gaussian filtering method to obtain a preprocessed image of the power transmission line; based on the horizontal gradient template and the vertical gradient template included in the Canny edge detection algorithm, add a first diagonal gradient template and a second diagonal gradient template, and calculate the gradient value of the preprocessed image of the power transmission line according to the four directional gradient templates; according to the iterative algorithm, generate a maximum threshold and a minimum threshold in the grayscale value of each pixel of the preprocessed image of the power transmission line, retain the edge pixels corresponding to the gradient values between the maximum threshold and the minimum threshold, and obtain an edge detection result image.
预测模型改进模块506,用于将YOLOv7模型中的SiLU激活函数替换为Mish激活函数,以及将YOLOv7模型中的CIou损失函数替换为SIoU损失函数,其中,所述坐标预测模型为对YOLOv7模型的改进模型。The prediction model improvement module 506 is used to replace the SiLU activation function in the YOLOv7 model with the Mish activation function, and replace the CIou loss function in the YOLOv7 model with the SIoU loss function, wherein the coordinate prediction model is an improved model of the YOLOv7 model.
预测模型训练模块507,用于获取包含电塔的多个数据集基础图像,对所述数据集基础图像进行标准化处理后,获得数据集标准化图像,通过预设数据标注工具对所述数据集标准化图像中的电塔及电塔包含的绝缘子进行标注,生成电塔定位数据集;对所述电塔定位数据集通过均匀随机抽样的方式,将所述电塔定位数据集无交集地划分为预设第一比例的电塔定位训练数据集、预设第二比例的电塔定位测试数据集及预设第三比例的电塔定位验证数据集;将所述电塔定位训练数据集、所述电塔定位测试数据集及所述电塔定位验证数据集输入坐标预测模型进行训练,获得训练后的坐标预测模型。The prediction model training module 507 is used to obtain multiple basic images of data sets containing power towers, standardize the basic images of the data sets to obtain standardized images of the data sets, and use a preset data annotation tool to annotate the power towers and insulators contained in the standardized images of the data sets to generate a power tower positioning data set; divide the power tower positioning data set into a tower positioning training data set of a preset first ratio, a tower positioning test data set of a preset second ratio, and a tower positioning verification data set of a preset third ratio without intersection by uniform random sampling; input the tower positioning training data set, the tower positioning test data set, and the tower positioning verification data set into a coordinate prediction model for training to obtain a trained coordinate prediction model.
可选地,所述线路图像处理模块505,还用于:Optionally, the line image processing module 505 is further used to:
根据像素灰度调整公式调整所述输电线路标准化图像中每个像素的灰度值,获得输电线路灰度化图像,其中,所述像素灰度调整公式为:The grayscale value of each pixel in the standardized image of the power transmission line is adjusted according to a pixel grayscale adjustment formula to obtain a grayscale image of the power transmission line, wherein the pixel grayscale adjustment formula is:
Gray(i,j)=0.29*R+0.578*G+0.114*BGray(i,j)=0.29*R+0.578*G+0.114*B
Gray(i,j)表示输电线路标准化图像对应的像素点矩阵中第i行第j列的灰度值,R、G及B分别表示红色通道矩阵、绿色通道矩阵及蓝色通道矩阵。Gray(i,j) represents the gray value of the i-th row and j-th column in the pixel matrix corresponding to the standardized image of the power transmission line, and R, G, and B represent the red channel matrix, green channel matrix, and blue channel matrix, respectively.
可选地,所述线路图像处理模块505,还用于:Optionally, the line image processing module 505 is further used to:
根据直方图均衡化公式将所述输电线路灰度化图像中的灰度分布均衡化,获得输电线路均衡化图像,其中,所述直方图均衡化公式为:The grayscale distribution in the grayscale image of the power transmission line is equalized according to a histogram equalization formula to obtain a transmission line equalized image, wherein the histogram equalization formula is:
n表示输电线路灰度化图像中像素总和,k表示k级灰度级,nk表示灰度级为rk的像素个数,L表示输电线路灰度化图像中灰度级总数,pr(r)表示输电线路灰度化图像的灰度级概率密度。n represents the total number of pixels in the grayscale image of the transmission line, k represents the k-level grayscale, nk represents the number of pixels with grayscale level rk , L represents the total number of grayscale levels in the grayscale image of the transmission line, and p r (r) represents the grayscale probability density of the grayscale image of the transmission line.
可选地,电塔角度计算模块502,还用于:Optionally, the tower angle calculation module 502 is further used for:
根据Hough变换算法计算所述边缘检测结果图像对应的潜在电力线及潜在电力线斜率,根据所述潜在电力线斜率,确定互相平行的潜在电力线组;Calculate the potential lines of force and the slopes of the potential lines of force corresponding to the edge detection result image according to the Hough transform algorithm, and determine a group of potential lines of force that are parallel to each other according to the slopes of the potential lines of force;
根据K-means++聚类算法对所述潜在电力线组的斜率进行聚类,确定多个类中包含的斜率数量最多的目标类,获取所述目标类的聚类中心斜率作为角度θ1,根据所述角度θ1及电塔偏移角度计算公式计算电塔偏移角度θ2,其中,所述电塔偏移角度计算公式为:The slopes of the potential power line groups are clustered according to the K-means++ clustering algorithm, a target class with the largest number of slopes among the multiple classes is determined, the cluster center slope of the target class is obtained as the angle θ 1 , and the tower offset angle θ 2 is calculated according to the angle θ 1 and the tower offset angle calculation formula, wherein the tower offset angle calculation formula is:
可选地,所述有效区域确定模块503,还用于:Optionally, the effective area determination module 503 is further configured to:
根据电塔方向和所述电塔偏移角度θ2对所述电塔定位框进行旋转,并以旋转后的电塔定位框的中心点为中心,按预设放大系数对所述旋转后的电塔定位框进行放大,获得电塔偏移框;The tower positioning frame is rotated according to the tower direction and the tower offset angle θ2 , and the rotated tower positioning frame is enlarged according to a preset magnification factor with the center point of the rotated tower positioning frame as the center to obtain a tower offset frame;
根据所述电塔偏移框的对角,确定第一延伸点及第二延伸点,根据所述第一延伸点及所述第二延伸点确定有效电力线提取区域。A first extension point and a second extension point are determined according to the diagonal corners of the tower offset frame, and an effective power line extraction area is determined according to the first extension point and the second extension point.
可选地,所述电力线提取模块504,还用于:Optionally, the power line extraction module 504 is further configured to:
根据LSD直线检测算法对所述有效电力线提取区域进行直线检测,获得待拟合候选电力线段,将所述待拟合候选电力线段放入线段池中;Perform straight line detection on the effective power line extraction area according to the LSD straight line detection algorithm to obtain candidate power line segments to be fitted, and put the candidate power line segments to be fitted into a line segment pool;
根据所述线段池中各待拟合候选电力线段之间的距离,将小于预设距离阈值的待拟合候选电力线段放入待拟合候选电力线段组;According to the distances between the candidate power line segments to be fitted in the line segment pool, the candidate power line segments to be fitted whose distances are less than a preset distance threshold are put into a candidate power line segment group to be fitted;
根据最小二乘法拟合所述待拟合候选电力线段组中的全部待拟合候选电力线段,获得拟合直线,将所述拟合直线中与所述电塔偏移角度垂直的拟合直线,确定为候选电力线。All the candidate power line segments to be fitted in the candidate power line segment group to be fitted are fitted according to the least square method to obtain a fitting straight line, and a fitting straight line perpendicular to the tower offset angle among the fitting straight lines is determined as a candidate power line.
可选地,所述电塔坐标预测模块501,还用于:Optionally, the tower coordinate prediction module 501 is further used for:
根据坐标预测模型对所述输电线路标准化处图像进行绝缘子坐标预测,得到绝缘子预测坐标及绝缘子预测中心点。The insulator coordinates are predicted for the transmission line standardization image according to the coordinate prediction model to obtain the insulator prediction coordinates and the insulator prediction center point.
可选地,所述电力线提取模块504,还用于:Optionally, the power line extraction module 504 is further configured to:
根据预设电力线模板,将所述电塔标准图像映射到输电线路标准化图像后,根据绝缘子预测中心点与候选电力线的距离对候选电力线进行投票,根据投票结果确定待检测输电线路的电力线,其中,所述预设电力线模板通过计算输电线路标准化图像映射到电塔标准图像的单应矩阵获得。According to the preset power line template, after mapping the standard image of the power tower to the standardized image of the transmission line, the candidate power lines are voted according to the distance between the predicted center point of the insulator and the candidate power lines, and the power lines of the transmission line to be detected are determined according to the voting results, wherein the preset power line template is obtained by calculating the homography matrix of mapping the standardized image of the transmission line to the standard image of the power tower.
需要说明的是,本申请实施例提供的一种电力线提取装置所涉及各功能单元的其他相应描述,可以参考图1至图3方法中的对应描述,在此不再赘述。It should be noted that, for other corresponding descriptions of the functional units involved in the power line extraction device provided in the embodiment of the present application, reference may be made to the corresponding descriptions in the methods of FIG. 1 to FIG. 3 , which will not be repeated here.
基于上述如图1至图3所示方法,相应的,本申请实施例还提供了一种存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述如图1至图2所示的电力线提取方法。Based on the above method as shown in Figures 1 to 3, accordingly, an embodiment of the present application also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the power line extraction method as shown in Figures 1 to 2 is implemented.
基于这样的理解,本申请的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施场景所述的方法。Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.
基于上述如图1至图3所示的方法,以及图4及图5所示的虚拟装置实施例,为了实现上述目的,本申请实施例还提供了一种计算机设备,具体可以为个人计算机、服务器、网络设备等,该计算机设备包括存储介质和处理器;存储介质,用于存储计算机程序;处理器,用于执行计算机程序以实现上述如图1至图3所示的电力线提取方法。Based on the above-mentioned method as shown in Figures 1 to 3, and the virtual device embodiments shown in Figures 4 and 5, in order to achieve the above-mentioned purpose, the embodiment of the present application also provides a computer device, which can be specifically a personal computer, a server, a network device, etc. The computer device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to implement the above-mentioned power line extraction method as shown in Figures 1 to 3.
可选地,该计算机设备还可以包括用户接口、网络接口、摄像头、射频(RadioFrequency,RF)电路,传感器、音频电路、WI-FI模块等等。用户接口可以包括显示屏(Display)、输入单元比如键盘(Keyboard)等,可选用户接口还可以包括USB接口、读卡器接口等。网络接口可选的可以包括标准的有线接口、无线接口(如蓝牙接口、WI-FI接口)等。Optionally, the computer device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a WI-FI interface), etc.
本领域技术人员可以理解,本实施例提供的一种计算机设备结构并不构成对该计算机设备的限定,可以包括更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art will appreciate that the computer device structure provided in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components, or a combination of certain components, or different component arrangements.
存储介质中还可以包括操作系统、网络通信模块。操作系统是管理和保存计算机设备硬件和软件资源的程序,支持信息处理程序以及其它软件和/或程序的运行。网络通信模块用于实现存储介质内部各组件之间的通信,以及与该实体设备中其它硬件和软件之间通信。The storage medium may also include an operating system and a network communication module. The operating system is a program that manages and saves the hardware and software resources of the computer device, and supports the operation of information processing programs and other software and/or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the physical device.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本申请可以借助软件加必要的通用硬件平台的方式来实现,也可以通过硬件实现,根据坐标预测模型对待检测输电线路的输电线路标准化处图像进行电塔坐标预测,得到电塔预测坐标;对输电线路标准化图像进行边缘检测并计算电塔偏移角度;根据电塔预测坐标确定电塔定位框,并根据电塔定位框及电塔偏移角度,确定有效电力线提取区域;对有效电力线提取区域进行直线检测,并将检测出的直线中与电塔偏移角度垂直的直线确定为候选电力线,根据预设电力线模板对候选电力线进行投票,根据投票结果确定待检测输电线路的电力线。基于航拍图像的特征,根据有监督算法(坐标预测模型)获得电塔预测坐标,接着对输电线路标准化图像进行边缘检测,以便检测到准确清晰的边缘,根据边缘检测结果图像计算电塔偏移角度,结合先验知识电力线必须在电力塔范围内,电力线与电力塔垂直,通过直线检测算法在有效电力线提取区域内检测直线(无监督算法),最后选取与电塔偏移角度近似垂直的直线作为候选电力线,并根据预设电力线模板确定电力线,提高了电力线检测的准确性。Through the description of the above implementation methods, technical personnel in this field can clearly understand that the present application can be implemented by means of software plus necessary general hardware platforms, and can also be implemented by hardware, and the tower coordinates are predicted for the transmission line standardized image of the transmission line to be detected according to the coordinate prediction model to obtain the tower predicted coordinates; edge detection is performed on the transmission line standardized image and the tower offset angle is calculated; the tower positioning frame is determined according to the tower predicted coordinates, and the effective power line extraction area is determined according to the tower positioning frame and the tower offset angle; straight line detection is performed on the effective power line extraction area, and the straight line perpendicular to the tower offset angle among the detected straight lines is determined as the candidate power line, and the candidate power lines are voted according to the preset power line template, and the power lines of the transmission line to be detected are determined according to the voting results. Based on the features of aerial images, the predicted coordinates of the tower are obtained according to a supervised algorithm (coordinate prediction model). Then, edge detection is performed on the standardized image of the transmission line to detect accurate and clear edges. The offset angle of the tower is calculated based on the edge detection result image. Combined with the prior knowledge that the power line must be within the range of the power tower and the power line is perpendicular to the power tower, a straight line detection algorithm is used to detect straight lines in the effective power line extraction area (unsupervised algorithm). Finally, a straight line that is approximately perpendicular to the tower offset angle is selected as a candidate power line, and the power line is determined according to the preset power line template, thereby improving the accuracy of power line detection.
本领域技术人员可以理解附图只是一个优选实施场景的示意图,附图中的模块或流程并不一定是实施本申请所必须的。本领域技术人员可以理解实施场景中的装置中的模块可以按照实施场景描述进行分布于实施场景的装置中,也可以进行相应变化位于不同于本实施场景的一个或多个装置中。上述实施场景的模块可以合并为一个模块,也可以进一步拆分成多个子模块。Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.
上述本申请序号仅仅为了描述,不代表实施场景的优劣。以上公开的仅为本申请的几个具体实施场景,但是,本申请并非局限于此,任何本领域的技术人员能思之的变化都应落入本申请的保护范围。The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.
Claims (11)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310540202.4A CN116843909B (en) | 2023-05-12 | 2023-05-12 | Power line extraction method and device, storage medium and computer equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310540202.4A CN116843909B (en) | 2023-05-12 | 2023-05-12 | Power line extraction method and device, storage medium and computer equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN116843909A CN116843909A (en) | 2023-10-03 |
| CN116843909B true CN116843909B (en) | 2024-03-08 |
Family
ID=88169440
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310540202.4A Active CN116843909B (en) | 2023-05-12 | 2023-05-12 | Power line extraction method and device, storage medium and computer equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116843909B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118971914B (en) * | 2024-10-18 | 2025-01-07 | 汕头市永捷新能源科技有限公司 | Method and system for testing transmission performance of vehicle-mounted Ethernet cable harness |
Citations (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104978580A (en) * | 2015-06-15 | 2015-10-14 | 国网山东省电力公司电力科学研究院 | Insulator identification method for unmanned aerial vehicle polling electric transmission line |
| CN108109155A (en) * | 2017-11-28 | 2018-06-01 | 东北林业大学 | A kind of automatic threshold edge detection method based on improvement Canny |
| CN111444809A (en) * | 2020-03-23 | 2020-07-24 | 华南理工大学 | An abnormal target detection method for transmission lines based on improved YOLOv3 |
| KR20210090489A (en) * | 2020-01-10 | 2021-07-20 | 한국전력공사 | CAMERA DRONE for INSPECTING TRANSMISSION TOWER and SHOOTING METHOD of POWER LINE or TRANSMISSION TOWER |
| CN113762276A (en) * | 2021-08-17 | 2021-12-07 | 湖南大学 | A kind of electric work ladder angle detection method |
| CN114022761A (en) * | 2021-10-26 | 2022-02-08 | 国网辽宁省电力有限公司经济技术研究院 | A kind of satellite remote sensing image transmission line tower detection and positioning method and device |
| CN114114314A (en) * | 2021-11-08 | 2022-03-01 | 国网福建省电力有限公司漳州供电公司 | Power transmission line inspection detection system and detection method based on laser point cloud |
| CN115239667A (en) * | 2022-07-21 | 2022-10-25 | 淮阴工学院 | Tire qualification detection method based on multi-view camera |
| CN115564725A (en) * | 2022-09-29 | 2023-01-03 | 四川省公路规划勘察设计研究院有限公司 | Slope monitoring method and device based on image intelligent recognition |
| CN115731164A (en) * | 2022-09-14 | 2023-03-03 | 常州大学 | Insulator defect detection method based on improved YOLOv7 |
| CN115761404A (en) * | 2022-11-18 | 2023-03-07 | 云南电网有限责任公司电力科学研究院 | Training method, using method and training device of YOLOv5s model |
| CN115841669A (en) * | 2022-09-30 | 2023-03-24 | 国网山西省电力公司大同供电公司 | Pointer instrument detection and reading identification method based on deep learning technology |
| CN115841633A (en) * | 2022-12-05 | 2023-03-24 | 深圳市优智创芯科技有限公司 | Power tower and power line associated correction power tower and power line detection method |
| CN115861186A (en) * | 2022-11-15 | 2023-03-28 | 佳源科技股份有限公司 | Electric power tower detection method and device based on deep learning and unmanned aerial vehicle equipment |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2017021751A1 (en) * | 2015-08-06 | 2017-02-09 | Accenture Global Services Limited | Vegetation management for power line corridor monitoring using computer vision |
| CN106356757B (en) * | 2016-08-11 | 2018-03-20 | 河海大学常州校区 | A kind of power circuit unmanned plane method for inspecting based on human-eye visual characteristic |
-
2023
- 2023-05-12 CN CN202310540202.4A patent/CN116843909B/en active Active
Patent Citations (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104978580A (en) * | 2015-06-15 | 2015-10-14 | 国网山东省电力公司电力科学研究院 | Insulator identification method for unmanned aerial vehicle polling electric transmission line |
| CN108109155A (en) * | 2017-11-28 | 2018-06-01 | 东北林业大学 | A kind of automatic threshold edge detection method based on improvement Canny |
| KR20210090489A (en) * | 2020-01-10 | 2021-07-20 | 한국전력공사 | CAMERA DRONE for INSPECTING TRANSMISSION TOWER and SHOOTING METHOD of POWER LINE or TRANSMISSION TOWER |
| CN111444809A (en) * | 2020-03-23 | 2020-07-24 | 华南理工大学 | An abnormal target detection method for transmission lines based on improved YOLOv3 |
| CN113762276A (en) * | 2021-08-17 | 2021-12-07 | 湖南大学 | A kind of electric work ladder angle detection method |
| CN114022761A (en) * | 2021-10-26 | 2022-02-08 | 国网辽宁省电力有限公司经济技术研究院 | A kind of satellite remote sensing image transmission line tower detection and positioning method and device |
| CN114114314A (en) * | 2021-11-08 | 2022-03-01 | 国网福建省电力有限公司漳州供电公司 | Power transmission line inspection detection system and detection method based on laser point cloud |
| CN115239667A (en) * | 2022-07-21 | 2022-10-25 | 淮阴工学院 | Tire qualification detection method based on multi-view camera |
| CN115731164A (en) * | 2022-09-14 | 2023-03-03 | 常州大学 | Insulator defect detection method based on improved YOLOv7 |
| CN115564725A (en) * | 2022-09-29 | 2023-01-03 | 四川省公路规划勘察设计研究院有限公司 | Slope monitoring method and device based on image intelligent recognition |
| CN115841669A (en) * | 2022-09-30 | 2023-03-24 | 国网山西省电力公司大同供电公司 | Pointer instrument detection and reading identification method based on deep learning technology |
| CN115861186A (en) * | 2022-11-15 | 2023-03-28 | 佳源科技股份有限公司 | Electric power tower detection method and device based on deep learning and unmanned aerial vehicle equipment |
| CN115761404A (en) * | 2022-11-18 | 2023-03-07 | 云南电网有限责任公司电力科学研究院 | Training method, using method and training device of YOLOv5s model |
| CN115841633A (en) * | 2022-12-05 | 2023-03-24 | 深圳市优智创芯科技有限公司 | Power tower and power line associated correction power tower and power line detection method |
Non-Patent Citations (6)
| Title |
|---|
| Development of power transmission line detection technology based on unmanned aerial vehicle image vision;Baoyu Xu 等;《SN Applied Sciences》;1-15 * |
| UAV Transmission Line Inspection Object Recognition based on Mask R-CNN;Yi Liu 等;《CISAT 2019》;1-9 * |
| 基于Hough变换的目标数据处理算法研究;陈镜 等;《无线电工程》;第50卷(第5期);357-361 * |
| 基于图像处理的无人机电力巡线航向偏差检测;杨坚 等;《浙江电力》;第40卷(第9期);105-110 * |
| 改进的Canny算法在工业机器人视觉系统中的应用;刘亮亮 等;《河南科技》;第42卷(第3期);第31-34页,第2-3.2节 * |
| 无人机影像中直线类电力线检测算法研究;李朋月 等;《电子测量技术》;第42卷(第19期);148-153 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116843909A (en) | 2023-10-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9530045B2 (en) | Method, system and non-transitory computer storage medium for face detection | |
| CN107103320B (en) | Embedded medical data image identification and integration method | |
| CN110472623A (en) | Image detecting method, equipment and system | |
| CN110222787A (en) | Multiscale target detection method, device, computer equipment and storage medium | |
| WO2017181892A1 (en) | Foreground segmentation method and device | |
| CN111695373B (en) | Zebra stripes positioning method, system, medium and equipment | |
| CN110930411B (en) | Human body segmentation method and system based on depth camera | |
| CN112883959B (en) | Identity card integrity detection method, device, equipment and storage medium | |
| CN114463503B (en) | Method and device for integrating three-dimensional model and geographic information system | |
| CN106485651A (en) | The image matching method of fast robust Scale invariant | |
| CN117975546B (en) | Fundus image feature point matching method based on improved feature descriptors and KNN search | |
| CN113743378A (en) | Fire monitoring method and device based on video | |
| CN111881803A (en) | Livestock face recognition method based on improved YOLOv3 | |
| CN114820987A (en) | Three-dimensional reconstruction method and system based on multi-view image sequence | |
| CN118172334A (en) | A cascade detection method for electrical components in power grid wiring diagram based on Transformer and residual convolution | |
| CN116843909B (en) | Power line extraction method and device, storage medium and computer equipment | |
| CN107392211B (en) | Salient target detection method based on visual sparse cognition | |
| CN108960247B (en) | Image significance detection method and device and electronic equipment | |
| CN116012393A (en) | Carton point cloud segmentation method, device and processing equipment | |
| CN115995017A (en) | A method, device and medium for fruit identification and positioning | |
| CN118097664A (en) | A method, device, equipment and medium for judging similarity of cell-intensive biomedical images | |
| CN114494712A (en) | Object extraction method and device | |
| WO2025025465A1 (en) | Infrared face image quality evaluation method and apparatus | |
| CN111325209A (en) | License plate recognition method and system | |
| CN115272285A (en) | Quality evaluation algorithm based on downsampling panoramic image data set |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |