**2. Power line detection**

In this section, we show different methods for the detection of electrical lines through image processing and computer vision, which include methods for detection of rectilinear segments and catenary. Also, the use of machine learning is presented.

#### **2.1 Line detection process**

There are different methods for line detection [8–11]. Some of them are based on graphics processing unit (GPU) approaches and geometrical considerations [12–15] that can be used in the context of power line detection. It is important to note that line detection methods based on monocular images present better results in uniform background sceneries.

For the detection of rectilinear long segments from images taken from a topdown view, the process can be composed of the stages shown in **Figure 2**.

As this process cannot differentiate the power lines from other lines presented in the scene, there exists the possibility of using machine learning to reduce detection errors or improving the power line detection.

#### *2.1.1 Machine learning method*

The recognition system has to be trained with real power lines; after that the system must be able to recognize or select the power lines in a scene. In the first stage, it is necessary to define what lines are electrical lines. This is done by using an application for labelling as shown in **Figure 3**.

This system operates in two modes, training and detection, as shown in **Figure 4**.

**53**

**Figure 3.** *Power line labelling.*

**Figure 2.**

*Stages of a rectilinear process detection.*

*Vision-Based Path Finding Strategy of Unmanned Aerial Vehicles for Electrical Infrastructure…*

(tagging), manually, the power lines in each image in order to select only the lines that correspond to power lines in the training mode as a true example. For this reason, an application with a graphical user interface (GUI) for selecting lines over

a copy of the real image can be used (**Figure 3**).

*DOI: http://dx.doi.org/10.5772/intechopen.86689*

The training mode begins with an edge detector such as Sobel, Prewitt, Canny or Edge drawing. After that, different line detection methods can be used for detecting a representative set of lines present in the scene. The dataset is obtained by labelling

*Vision-Based Path Finding Strategy of Unmanned Aerial Vehicles for Electrical Infrastructure… DOI: http://dx.doi.org/10.5772/intechopen.86689*

#### **Figure 2.**

*Path Planning for Autonomous Vehicles - Ensuring Reliable Driverless Navigation...*

An important aspect of autonomous navigation systems is the collision avoid-

The access throughout the corridor is very important since it is necessary in order to inspect the area surrounding power lines. It must be free of obstacles and vegetation. As a part of the inspection process, an important task is the detection of elements of the electrical infrastructure; this is achieved by using computer vision techniques such as object detection. The common objects present in the electrical infrastructure scene are the power lines and electrical towers. An additional task is the 3D reconstruction of the elements of the scene by using the captured images.

In this section, we show different methods for the detection of electrical lines through image processing and computer vision, which include methods for detection of rectilinear segments and catenary. Also, the use of machine learning is presented.

There are different methods for line detection [8–11]. Some of them are based on graphics processing unit (GPU) approaches and geometrical considerations [12–15] that can be used in the context of power line detection. It is important to note that line detection methods based on monocular images present better results in uni-

For the detection of rectilinear long segments from images taken from a top-

The recognition system has to be trained with real power lines; after that the system must be able to recognize or select the power lines in a scene. In the first stage, it is necessary to define what lines are electrical lines. This is done by using an

This system operates in two modes, training and detection, as shown in **Figure 4**. The training mode begins with an edge detector such as Sobel, Prewitt, Canny or Edge drawing. After that, different line detection methods can be used for detecting a representative set of lines present in the scene. The dataset is obtained by labelling

As this process cannot differentiate the power lines from other lines presented in the scene, there exists the possibility of using machine learning to reduce detection

down view, the process can be composed of the stages shown in **Figure 2**.

ance [6, 7]. In a path planning process for automatic inspection of electrical infrastructure, it is necessary to be able to avoid electrical towers and power lines. The first task for accomplishing this goal is an object detection process that will be

discussed in this chapter.

*Example of different methods for power line inspection.*

**Figure 1.**

**2. Power line detection**

**2.1 Line detection process**

form background sceneries.

*2.1.1 Machine learning method*

errors or improving the power line detection.

application for labelling as shown in **Figure 3**.

**52**

*Stages of a rectilinear process detection.*

(tagging), manually, the power lines in each image in order to select only the lines that correspond to power lines in the training mode as a true example. For this reason, an application with a graphical user interface (GUI) for selecting lines over a copy of the real image can be used (**Figure 3**).

#### **Figure 4.**

*Process for line recognition system, training and detection.*

The overall detected lines are compared with the labeled lines in order to differentiate the positive and negative samples. The positive samples are power lines that overlap the previously labeled lines. The negative samples are other lines detected in the scene that are not power lines. This corresponds to lines that have not been tagged.

The overlapping between the tagged lines and detected lines that are not power lines must be zero.

After that, a feature extraction stage is performed by using HOG descriptors [16], which are computed for the selected lines on the labeled dataset. This is done in spaced squared windows centred in the lines. In **Figure 5**, the extraction of the HOG descriptor in windows across a labeled power line is shown.

Finally, the obtained descriptor values in the previous stage are the input data for the classifier. The SVM classifier is trained with this input data using a sigmoid kernel.

The detection mode has to be used after a training mode. The objective of this stage is to detect the power lines using the previously trained classifier.

This begins with segmenting and detecting lines as in the previous mode. After that, HOG descriptors are computed across the detected lines using squared windows as were done in training mode. This information is gathered for the classifier.

**55**

**Figure 7.**

*Result of a machine learning method.*

*Vision-Based Path Finding Strategy of Unmanned Aerial Vehicles for Electrical Infrastructure…*

In **Figure 6**, the detection of all linear elements using a conventional line detection method is shown. The results of the machine learning method are shown in **Figure 7**. Finally, the SVM is evaluated with the obtained descriptor data. Line segments which pass this evaluation are power line candidates. Another possibility is to use deep learning methods and contextual information in order to improve the detection [1].

Most of the works on power line detection are focused in straight line detection.

Nevertheless, the electrical infrastructure is composed of catenaries which are

*DOI: http://dx.doi.org/10.5772/intechopen.86689*

**2.2 Catenary detection**

**Figure 5.**

**Figure 6.**

*Line detection in the scene.*

*Extracting HOG descriptor in lines.*

*Vision-Based Path Finding Strategy of Unmanned Aerial Vehicles for Electrical Infrastructure… DOI: http://dx.doi.org/10.5772/intechopen.86689*

In **Figure 6**, the detection of all linear elements using a conventional line detection method is shown. The results of the machine learning method are shown in **Figure 7**.

Finally, the SVM is evaluated with the obtained descriptor data. Line segments which pass this evaluation are power line candidates. Another possibility is to use deep learning methods and contextual information in order to improve the detection [1].
