# Line-Detection Based on the Sum of Gradient Angle Differences
## 5 Line-Detection Experiments with Natural Images  
Figure 8 shows the four \(512\times 512\) pixel natural images employed herein. Two of them are the well-known Lena and Barbara images, and the other two are subsets of images of a shrub and a building facade acquired with a DSLR camera. Image intensity was [0, 255].  
The performance of the SD-, EC-, and SGAD-based methods was tested in two phases. In the first phase, the performance of the methods was tested using raw images to evaluate their line-detection performance on the original versions of images. In the second phase, the performance of the methods was tested by contaminating the raw images with Gaussian noise \(\sigma_{n}=5\).  
In both phases, the images were smoothed with \(\sigma_{s}=1.0\) to reduce the noise. Figures 9 and 10 show the line-detection results obtained in the first and the second phases for the regions marked by red boxes in Figure 8, respectively. For each natural image, the detailed views of line-detection results for the regions are shown in Figure 9. Figure 10 shows the detailed views of the line-detection results corresponding to those shown in Figure 9.  
As shown in Figure 9, the SD-based line-detection method fails to detect the line pixels correctly when line width is relatively large, as shown distinctively in the detailed views of Lena 1, Lena 2, Barbara 2, Facade 1, and Facade 2. In the detailed view of Lena 2, the SD-based method produced the boundary pixels of a thick line feature as line pixels, which is unsuitable given the purpose of line detection.  
The EC-based method detected line pixels with a few missing pixels, fragmentation, and a greater number of noisy pixels as compared to the SGAD-based method, as shown in all corresponding detailed views of the results obtained using the EC- and the SGAD-based methods.  
Thus, the experimental results obtained using the raw images indicate that the SGAD-based method produces the best line-detection results among the three methods.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \(\sigma_{s}\) & **SD** & **EC** & **SGAD** \\ \hline
0.50 & 31.7 & 10.2 & 21.0 \\
0.75 & 30.5 & 9.5 & 19.5 \\
1.00 & 31.8 & 9.3 & 18.6 \\
1.25 & 30.9 & 9.0 & 18.2 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Processing times of SD-, EC-, and SGAD-based methods for simulated images (in seconds).  
Figure 8: Natural \(512\times 512\) pixel images: (**a**) Lena; (**b**) Barbara; (**c**) Shrub; and (**d**) Facade  
As shown in the detailed views of Lena 2 and Facade 2 in Figure 10, the EC-based method is affected by additional noise to a greater extent than the SGAD-based method. The detailed view of Facade 2 shows that the line pixels detected by the EC-based method are more jagged because of the addition of noise than those detected by the SGAD-based method. Thus, the experiments with noisy images indicate that the proposed SGAD-based method is less sensitive to noise compared to the other methods.  
Figure 9: Line-detection results obtained using the SD-, EC-, and SGAD-based methods for the original images. Ridge and valley pixels are denoted by upward-pointing black and downward-pointing white triangles, respectively.