# Quadratic Curve Fitting-Based Image Edge Line Segment Detection: A Novel Methodology
## 3 Edge Line Segment Extraction Based on Quadratic Curve Fitting
All codes were run on the same workstation with the following hardware configuration: i7-10700 KF processor, 3.80 GHz main frequency, and 32 GB RAM. The performance of the LSD algorithm and the proposed QF-LSD algorithm is depicted in Figures 3 and 4a-x. The algorithms are tested on images from regular lenses (minor distortion), wide-angle lenses, and fisheye lenses to assess the edge line segment detection capabilities. Evidently, both the QF-LSD algorithm and the LSD algorithm can effectively and accurately extract edge line segments from images without distortion (or with minor distortion). However, the difference is that the LSD algorithm can detect more abundant edge detail information. From Table 1, we can see that its recall rate is high. This is because the LSD algorithm uses gradient direction and gradient magnitude information during the edge line segment detection process. On the other hand, the QF-LSD algorithm proposed in this paper is dependent on edge detection results; hence, the extracted edge segments are not as rich as those extracted by the LSD algorithm. Figure 3: Test results of the LSD algorithm for different lens imaging images. (**a**–**h**) Regular lens images, (**i**–**p**) wide-angle lens images, and (**q**–**x**) fisheye lens images. Figure 4: Test results of the QF-LSD algorithm for different lens imaging images. (**a**–**h**) Regular lens images, (**i**–**p**) wide-angle lens images, and (**q**–**x**) fisheye lens images. In images captured using wide-angle lenses (i-p) and fisheye lenses (q-x), the LSD algorithm can still detect richer edge details. Nevertheless, as the LSD algorithm is designed for straight line segment extraction in distortion-free images, it is incapable of accurately and completely describing edge arc segments in images with significant distortion. For example, in Figure 3q, the arc curve at the junction of the wall and ceiling extracted by LSD is formed by connecting multiple straight-line segments of different colors, whereas in Figure 4q the curve segment extracted by the QF-LSD algorithm is represented by a complete green curve segment. It can only approximate these segments using smaller straight line segments, thus leading to reduced accuracy in detection. To improve the LSD algorithm's accuracy in aberrated images, a pre-correction of these images is necessary. This requires precise knowledge of the camera's distortion parameters, which is often challenging for some online vision tasks. In contrast, the QF-LSD algorithm proposed in this paper is independent of the camera's distortion parameters. It does not require a pre-processing of the distorted images. It can accurately and completely extract the edge arc segments in large distorted images. In vision tasks that typically rely on edge segments (e.g., visual pose measurement, visual SLAM, autonomous driving), the accuracy of the edge segment detection algorithm is more important than the amount that is detected. As long as accurate edge segments are extracted, the reliable implementation of corresponding vision tasks can be ensured. On the other hand, a low accuracy but high recall rate can only introduce more disturbing factors and larger errors in such vision tasks. Table 2 displays the time taken by both the LSD algorithm and the proposed QF-LSD algorithm to process each image. It can be observed that the operational efficiency of both algorithms is closely related to the image size and texture richness within the image. The larger the image size and the richer the texture information in the image, the longer both algorithms take to process the image. In comparison, the computational time of the QF-LSD algorithm presented in this paper is generally much smaller than that of the LSD algorithm.This is because the LSD algorithm not only calculates gradient direction and amplitude information when extracting straight line segments, but also employs region growth combined with hypothesis verification to obtain complete straight line segments, making the whole process more complex and time-consuming.