This paper presents a method to detect line pixels based on the sum of gradient angle differences (SGAD). The gradient angle differences are calculated by comparing the four pairs of gradients arising from eight neighboring pixels. In addition, a method to classify line pixels into ridges and valleys is proposed. Furthermore, a simple line model is defined for simulation experiments. Experiments are conducted with simulation images generated using the simple line model for three line-detection methods: second-derivatives (SD)-based method, extremity-count (EC)-based method, and proposed method. The results of the simulation experiments show that the proposed method produces more accurate line-detection results than the other methods in terms of the root mean square error when the line width is relatively large. In addition, the experiments conducted with natural images show that the SD-and EC-based methods suffer from bifurcation, fragmentation, and missing pixels. By contrast, for the original and the noise-contaminated versions of the natural images, the proposed SGAD-based line-detection method is affected by such problems to a considerably smaller extent than the other two methods.