# Line-Detection Based on the Sum of Gradient Angle Differences
## 1 Introduction  
In image-processing terminology, a line is a geometrically elongated feature that is either brighter or darker in intensity than its neighbors on either sides. In some scientific literature, a line is referred to as a ridge or a valley [1; 2; 3]. As one of the most important and frequently observed features in various types of imagery, including indoor imagery, building facade imagery, satellite imagery, medical imagery, and road imagery, a line is used by perceptual systems to analyze and interpret a scene in an image [4]. Therefore, line detection is a fundamental operation in image processing and computer vision. Another image processing technique called edge detection is used to find the boundaries of objects within images. Various operators are used to detect edges, including [PERSON]'s operator [5], the Sobel operator [6], [PERSON] operator [7], Laplacian of Gaussian (LoG) operator followed by zero crossing [8], and Canny operator [9]. These operators have ensured the widespread use of edge detection as an image-processing technique.  
Owing to the lack of an efficient direct method, edge-detection results are frequently employed to extract line features [10; 11; 12; 13; 14; 15]. However, this indirect method often fails to detect lines accurately, especially when the edge signal emanating from a line in an image is weak as compared to noise strength. In addition, this method requires a post-processing step to detect line pixels based on the edge pixels it detected on both sides of the line.  
In recent years, the demand for efficient extraction of line features from images has grown rapidly owing to advancements in various applications, including lane detection in autonomous driving [10; 11; 12; 13], blood vessel detection in medical imaging [14; 15], and road detection in satellite imaging [16].  
Although the demand for a method to detect line features directly has been strong, existing line-detection methods do not satisfy the quality requirements to serve the demand. For high-quality line detection, the operator must be insensitive to noise.  
The second-derivatives (SD)-based method for line detection was proposed approximately two decades ago in [17; 18]. However, in this paper, for relatively large line widths, the SD-based line-detection method was shown to produce dis-localized line pixels and low SNR. Line detection based on extremity count (EC) was proposed in [4]. However, this method only partially fulfilled the requirements of high-quality line detection. To resolve these problems and achieve high performance, herein, a novel line-detection method based on the sum of gradient angle differences (SGAD) is proposed. Furthermore, the present study proves that the performance of the SGAD-based line-detection method is better than that of the SD- and EC-based line-detection methods and that the proposed method maintains high quality even when the line width is relatively large. The main reason for the high quality of line-detection of the proposed method is the use of the oppositeness of gradient directions between four pairs of neighborhood pixels around a line pixel, which is relatively less affected by high noise level and relatively large line width as compared to other methods, thus providing higher SNR under varying conditions.  
The remainder of this paper is organized as follows. Section 2 describes related line-detection studies. Section 3 describes the proposed line-detection method. Sections 4 and 5 detail the experimental results obtained using simulation images and natural images, respectively. Section 6 concludes this paper.